[vlc-commits] [Git][videolan/vlc][3.0.x] youtube.lua - js_descramble function name return fix: the string pattern match...

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Sep 7 06:59:04 UTC 2021



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
98657e38 by Kung Lao at 2021-09-07T06:44:48+00:00
youtube.lua - js_descramble function name return fix: the string pattern match now returns 2 or 3 char length function names. Issue ref: #25988, #25995 (closed)

(cherry picked from commit c05eb00c25168f4693e09cb8fc1a8f2490883af6)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

- - - - -


1 changed file:

- share/lua/playlist/youtube.lua


Changes:

=====================================
share/lua/playlist/youtube.lua
=====================================
@@ -124,10 +124,12 @@ function js_descramble( sig, js_url )
 
     -- Look for the descrambler function's name
     -- if(k.s){var l=k.sp,m=pt(decodeURIComponent(k.s));f.set(l,encodeURIComponent(m))}
+    -- Descrambler function name - 3 chars length
+    -- if(h.s){var l=h.sp,m=wja(decodeURIComponent(h.s));f.set(l,encodeURIComponent(m))}
     -- k.s (from stream map field "s") holds the input scrambled signature
     -- k.sp (from stream map field "sp") holds a parameter name (normally
     -- "signature" or "sig") to set with the output, descrambled signature
-    local descrambler = js_extract( js, "[=%(,&|](..)%(decodeURIComponent%(.%.s%)%)" )
+    local descrambler = js_extract( js, "[=%(,&|](%a?%a?%a?)%(decodeURIComponent%(.%.s%)%)" )
     if not descrambler then
         vlc.msg.dbg( "Couldn't extract youtube video URL signature descrambling function name" )
         return sig



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/98657e385b59a0f4368ca5d7ba46d6cedcb42172

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/98657e385b59a0f4368ca5d7ba46d6cedcb42172
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list