This repository was archived by the owner on Sep 28, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ internal static class Decipherer
99 {
1010 public static string DecipherWithVersion ( string cipher , string cipherVersion )
1111 {
12- string jsUrl = string . Format ( "http://s.ytimg.com/yts/jsbin/html5player -{0}.js" , cipherVersion ) ;
12+ string jsUrl = string . Format ( "http://s.ytimg.com/yts/jsbin/player -{0}.js" , cipherVersion ) ;
1313 string js = HttpHelper . DownloadString ( jsUrl ) ;
1414
1515 //Find "C" in this: var A = B.sig||C (B.s)
@@ -22,9 +22,8 @@ public static string DecipherWithVersion(string cipher, string cipherVersion)
2222 funcName = "\\ " + funcName ; //Due To Dollar Sign Introduction, Need To Escape
2323 }
2424
25- string funcBodyPattern = @"(?<brace>{([^{}]| ?(brace))*})" ; //Match nested angle braces
26- string funcPattern = string . Format ( @"{0}\(\w+\){1}" , @funcName , funcBodyPattern ) ; //Escape funcName string
27- var funcBody = Regex . Match ( js , funcPattern ) . Groups [ "brace" ] . Value ; //Entire sig function
25+ string funcPattern = @"var " + @funcName + @"=function\(\w+\)\{.*?\};" ; //Escape funcName string
26+ var funcBody = Regex . Match ( js , funcPattern ) . Value ; //Entire sig function
2827 var lines = funcBody . Split ( ';' ) ; //Each line in sig function
2928
3029 string idReverse = "" , idSlice = "" , idCharSwap = "" ; //Hold name for each cipher method
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ private static string GetDecipheredSignature(string htmlPlayerVersion, string si
230230
231231 private static string GetHtml5PlayerVersion ( JObject json )
232232 {
233- var regex = new Regex ( @"html5player -(.+?)\ .js" ) ;
233+ var regex = new Regex ( @"player -(.+?).js" ) ;
234234
235235 string js = json [ "assets" ] [ "js" ] . ToString ( ) ;
236236
You can’t perform that action at this time.
0 commit comments