Skip to content

Commit 11ef1ef

Browse files
committed
Change to more compact code style
1 parent cd08e4d commit 11ef1ef

File tree

1 file changed

+10
-50
lines changed

1 file changed

+10
-50
lines changed

lib/antiCheat.ts

+10-50
Original file line numberDiff line numberDiff line change
@@ -26,56 +26,16 @@ const trivialChallenges = ['errorHandlingChallenge', 'privacyPolicyChallenge', '
2626
const solves: Array<{ challenge: any, phase: string, timestamp: Date, cheatScore: number }> = [{ challenge: {}, phase: 'server start', timestamp: new Date(), cheatScore: 0 }] // seed with server start timestamp
2727

2828
const preSolveInteractions: Array<{ challengeKey: any, urlFragments: string[], interactions: number }> = [
29-
{
30-
challengeKey: 'missingEncodingChallenge',
31-
urlFragments: ['/assets/public/images/uploads/%F0%9F%98%BC-'],
32-
interactions: 0
33-
},
34-
{
35-
challengeKey: 'directoryListingChallenge',
36-
urlFragments: ['/ftp'],
37-
interactions: 0
38-
},
39-
{
40-
challengeKey: 'easterEggLevelOneChallenge',
41-
urlFragments: ['/ftp', '/ftp/eastere.gg'],
42-
interactions: 0
43-
},
44-
{
45-
challengeKey: 'easterEggLevelTwoChallenge',
46-
urlFragments: ['/ftp', '/gur/qrif/ner/fb/shaal/gurl/uvq/na/rnfgre/rtt/jvguva/gur/rnfgre/rtt'],
47-
interactions: 0
48-
},
49-
{
50-
challengeKey: 'forgottenDevBackupChallenge',
51-
urlFragments: ['/ftp', '/ftp/package.json.bak'],
52-
interactions: 0
53-
},
54-
{
55-
challengeKey: 'forgottenBackupChallenge',
56-
urlFragments: ['/ftp', '/ftp/coupons_2013.md.bak'],
57-
interactions: 0
58-
},
59-
{
60-
challengeKey: 'loginSupportChallenge',
61-
urlFragments: ['/ftp', '/ftp/incident-support.kdbx'],
62-
interactions: 0
63-
},
64-
{
65-
challengeKey: 'misplacedSignatureFileChallenge',
66-
urlFragments: ['/ftp', '/ftp/suspicious_errors.yml'],
67-
interactions: 0
68-
},
69-
{
70-
challengeKey: 'recChallenge',
71-
urlFragments: ['/api-docs', '/b2b/v2/orders'],
72-
interactions: 0
73-
},
74-
{
75-
challengeKey: 'rceOccupyChallenge',
76-
urlFragments: ['/api-docs', '/b2b/v2/orders'],
77-
interactions: 0
78-
}
29+
{ challengeKey: 'missingEncodingChallenge', urlFragments: ['/assets/public/images/uploads/%F0%9F%98%BC-'], interactions: 0 },
30+
{ challengeKey: 'directoryListingChallenge', urlFragments: ['/ftp'], interactions: 0 },
31+
{ challengeKey: 'easterEggLevelOneChallenge', urlFragments: ['/ftp', '/ftp/eastere.gg'], interactions: 0 },
32+
{ challengeKey: 'easterEggLevelTwoChallenge', urlFragments: ['/ftp', '/gur/qrif/ner/fb/shaal/gurl/uvq/na/rnfgre/rtt/jvguva/gur/rnfgre/rtt'], interactions: 0 },
33+
{ challengeKey: 'forgottenDevBackupChallenge', urlFragments: ['/ftp', '/ftp/package.json.bak'], interactions: 0 },
34+
{ challengeKey: 'forgottenBackupChallenge', urlFragments: ['/ftp', '/ftp/coupons_2013.md.bak'], interactions: 0 },
35+
{ challengeKey: 'loginSupportChallenge', urlFragments: ['/ftp', '/ftp/incident-support.kdbx'], interactions: 0 },
36+
{ challengeKey: 'misplacedSignatureFileChallenge', urlFragments: ['/ftp', '/ftp/suspicious_errors.yml'], interactions: 0 },
37+
{ challengeKey: 'recChallenge', urlFragments: ['/api-docs', '/b2b/v2/orders'], interactions: 0 },
38+
{ challengeKey: 'rceOccupyChallenge', urlFragments: ['/api-docs', '/b2b/v2/orders'], interactions: 0 }
7939
]
8040

8141
exports.checkForPreSolveInteractions = () => ({ url }: Request, res: Response, next: NextFunction) => {

0 commit comments

Comments
 (0)