This repository was archived by the owner on Sep 28, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,17 @@ public static string DecipherWithVersion(string cipher, string cipherVersion)
1313 string js = HttpHelper . DownloadString ( jsUrl ) ;
1414
1515 //Find "C" in this: var A = B.sig||C (B.s)
16- string functNamePattern = @"\.sig\s*\|\|(\w+|$)\(" ;
16+ string functNamePattern = @"\.sig\s*\|\|([a-zA-Z0-9\$]+)\(" ; //Regex Formed To Find Word or DollarSign
17+
1718 var funcName = Regex . Match ( js , functNamePattern ) . Groups [ 1 ] . Value ;
19+
20+ if ( funcName . Contains ( "$" ) )
21+ {
22+ funcName = "\\ " + funcName ; //Due To Dollar Sign Introduction, Need To Escape
23+ }
24+
1825 string funcBodyPattern = @"(?<brace>{([^{}]| ?(brace))*})" ; //Match nested angle braces
19- string funcPattern = string . Format ( @"{0}\(\w+\){1}" , funcName , funcBodyPattern ) ;
26+ string funcPattern = string . Format ( @"{0}\(\w+\){1}" , @ funcName, funcBodyPattern ) ; //Escape funcName string
2027 var funcBody = Regex . Match ( js , funcPattern ) . Groups [ "brace" ] . Value ; //Entire sig function
2128 var lines = funcBody . Split ( ';' ) ; //Each line in sig function
2229
You can’t perform that action at this time.
0 commit comments