Added sf minus 1, exploits

This commit is contained in:
Olivier Gagnon
2021-03-08 20:31:34 -05:00
parent d9aef91ea3
commit 250841df66
11 changed files with 145 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
/*
*/
export enum Exploit {
UndocumentedFunctionCall = 'UndocumentedFunctionCall',
EditSaveFile = 'EditSaveFile',
PrototypeTampering = 'PrototypeTampering'
}
const names: {
[key: string]: string;
} = {
'UndocumentedFunctionCall': 'by looking beyond the documentation.',
'EditSaveFile': 'by editing your save file.',
'PrototypeTampering': 'by tampering with Numbers prototype.',
}
export function ExploitName(exploit: string): string {
return names[exploit];
}
export function sanitizeExploits(exploits: string[]): string[] {
return exploits.filter((e: string) => Object.keys(Exploit).includes(e));
}