Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
4de1f284
Commit
4de1f284
authored
Jul 28, 2014
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
youtube.lua: remove obsolete static signature descrambling code
parent
2d21a0a6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
27 deletions
+6
-27
share/lua/playlist/youtube.lua
share/lua/playlist/youtube.lua
+6
-27
No files found.
share/lua/playlist/youtube.lua
View file @
4de1f284
...
...
@@ -160,32 +160,6 @@ function js_descramble( sig, js_url )
return
sig
end
function
descramble81
(
sig
)
sig
=
string.reverse
(
sig
)
local
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
,
s8
,
s9
,
s10
,
s11
,
s12
,
s13
=
string.match
(
sig
,
"(.)(.......................)(.)(..............)(.)(......)(.)(....)(.)(...................)(.)(........)(.)"
)
return
s3
..
s2
..
s5
..
s4
..
s1
..
s6
..
s13
..
s8
..
s7
..
s10
..
s9
..
s12
..
s11
end
local
descramblers
=
{
--[81] = descramble81
}
function
descramble
(
sig
,
js_url
)
vlc
.
msg
.
dbg
(
"Found "
..
string.len
(
sig
)
..
"-character scrambled signature for youtube video URL, attempting to descramble... "
)
if
js_url
then
sig
=
js_descramble
(
sig
,
js_url
)
else
local
descrambler
=
descramblers
[
string.len
(
sig
)]
if
descrambler
then
sig
=
descrambler
(
sig
)
else
vlc
.
msg
.
err
(
"Couldn't process youtube video URL, please check for updates to this script"
)
end
end
return
sig
end
-- Parse and pick our video URL
function
pick_url
(
url_map
,
fmt
,
js_url
)
local
path
=
nil
...
...
@@ -203,7 +177,12 @@ function pick_url( url_map, fmt, js_url )
-- Scrambled signature
sig
=
string.match
(
stream
,
"s=([^&,]+)"
)
if
sig
then
sig
=
descramble
(
sig
,
js_url
)
vlc
.
msg
.
dbg
(
"Found "
..
string.len
(
sig
)
..
"-character scrambled signature for youtube video URL, attempting to descramble... "
)
if
js_url
then
sig
=
js_descramble
(
sig
,
js_url
)
else
vlc
.
msg
.
err
(
"Couldn't process youtube video URL, please check for updates to this script"
)
end
end
end
local
signature
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment