mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 18:22:58 +02:00
25 lines
640 B
TypeScript
25 lines
640 B
TypeScript
/*
|
|
*/
|
|
|
|
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));
|
|
} |