[vlc-commits] [Git][videolan/vlc][master] 2 commits: youtube.lua: document an "n" descrambling transformation

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Thu Nov 25 11:48:05 UTC 2021



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
84ba044d by Pierre Ynard at 2021-11-25T11:33:31+00:00
youtube.lua: document an "n" descrambling transformation

- - - - -
6b5bc195 by Pierre Ynard at 2021-11-25T11:33:31+00:00
youtube.lua: exponential form integers in "n" descrambling input data

They now appear; add support for parsing them.

Fixes #26317

- - - - -


1 changed file:

- share/lua/playlist/youtube.lua


Changes:

=====================================
share/lua/playlist/youtube.lua
=====================================
@@ -286,6 +286,7 @@ function n_descramble( nparam, js )
         alphabet2 = {
             func = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
             match = {
+                -- function(){for(var d=64,e=[];++d-e.length-32;){switch(d){case 58:d-=14;case 91:case 92:case 93:continue;case 123:d=47;case 94:case 95:case 96:continue;case 46:d=95}e.push(String.fromCharCode(d))}return e}
                 -- function(){for(var d=64,e=[];++d-e.length-32;)switch(d){case 46:d=95;default:e.push(String.fromCharCode(d));case 94:case 95:case 96:break;case 123:d-=76;case 92:case 93:continue;case 58:d=44;case 91:}return e}
                 "^function%(%){[^}]-case 58:d%-=14;",
                 "^function%(%){[^}]-case 58:d=44;",
@@ -375,7 +376,9 @@ function n_descramble( nparam, js )
         elseif string.match( datac, '^"[^"]*",' ) then
             el, datac = string.match( datac, '^"([^"]*)",(.*)$' )
         -- Integer input data
-        elseif string.match( datac, '^-?%d+,' ) then
+        -- 1818016376,-648890305,-1200559E3, ...
+        elseif string.match( datac, '^%-?%d+,' ) or
+               string.match( datac, '^%-?%d+[eE]%-?%d+,' ) then
             el, datac = string.match( datac, "^(.-),(.*)$" )
             el = tonumber( el )
         -- Reference to "n" parameter array



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/16d6b2311d7780bedfe938be64051a7587ce81cd...6b5bc195a9811c6bb666ef3a30a100db7bb71092

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/16d6b2311d7780bedfe938be64051a7587ce81cd...6b5bc195a9811c6bb666ef3a30a100db7bb71092
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list