File tree Expand file tree Collapse file tree 2 files changed +8549
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8549
-0
lines changed Original file line number Diff line number Diff line change @@ -695,6 +695,7 @@ struct ThrottlingAlgorithm
695695 // $EK=function(p){var y=p[G[59]](G[11]),...return y[G[54]](G[11])};
696696 ctRegex! (` (.{3})=function\(\w+\)\{var \w+=\w\[.+\]\(.+\),(.|\s)+?return .+\(.+\)\};` ),
697697 ctRegex! (` var \w{3}=\[(\w{3})\]` ),
698+ ctRegex! (` var .{3}=\[(.{3})\]` ),
698699 ];
699700 foreach (regex; regexes)
700701 {
@@ -913,3 +914,16 @@ unittest
913914
914915 assert (expected == actual, expected ~ " != " ~ actual);
915916}
917+
918+ unittest
919+ {
920+ writeln(" Should parse challenge in base.js 3062cec8.js" .formatTitle());
921+ scope (success) writeln (" OK\n " .formatSuccess());
922+ auto algorithm = ThrottlingAlgorithm(" tests/3062cec8.js" .readText(), new StdoutLogger());
923+ assert (algorithm.findChallengeName() == " EuO" , algorithm.findChallengeName() ~ " != EuO" );
924+
925+ string expected = " aXtqvScqyMQNhg" ;
926+ string actual = algorithm.solve(" POgLT81CGkQw4dNl" );
927+
928+ assert (expected == actual, expected ~ " != " ~ actual);
929+ }
You can’t perform that action at this time.
0 commit comments