Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vevo sig changed again, please update for us! Thanks very much! #1164

Closed
mikeygao opened this issue Aug 1, 2013 · 8 comments
Closed

Vevo sig changed again, please update for us! Thanks very much! #1164

mikeygao opened this issue Aug 1, 2013 · 8 comments

Comments

@mikeygao
Copy link

@mikeygao mikeygao commented Aug 1, 2013

Is there any way to automatic the detecting and decrypting?

@vanilla38
Copy link

@vanilla38 vanilla38 commented Aug 1, 2013

Confirmed, 83 length

@awojnowski
Copy link
Contributor

@awojnowski awojnowski commented Aug 1, 2013

Signature decryption algorithm (plug the encrypted signature into the hj function and it'll spit out the good signature):

function hj(a) {
    a = a.split("");
    a = a.reverse();
    a = a.slice(2);
    var b = a[0];
    a[0] = a[65 % a.length];
    a[65] = b;
    a = a.reverse();
    return a.join("")
};
@vanilla38
Copy link

@vanilla38 vanilla38 commented Aug 1, 2013

really nice ! what do we dont implement it directly in the code instead of adding them manually ?
Thanks alot

@patrickslin
Copy link
Contributor

@patrickslin patrickslin commented Aug 1, 2013

Probably easier just to use the algo that @speedyapocalypse posted. :) New sig len 83 algo below anyway.

pairs:
9A61D36F6B2B3AE9AF4D1FDA56001BDFE4F285DD.A593443C93C5778C46676E05D8F5E8BA74E09A1818
9A61D36F6B2B3AE8AF4D1FDA56001BDFE4F285DD.A593443C93C5778C46676E05D8F5E8BA74E09A19

8F157756503C1118026EEE549D03EA4DF0642A2A.784F834B92CDC44CD9374C7A3E4FD0472E395DBABA
8F157756503C111A026EEE549D03EA4DF0642A2A.784F834B92CDC44CD9374C7A3E4FD0472E395DB8

python:
s[0:15] + s[80] + s[16:80] + s[15]

javascript
s.slice(0, 15).join('') + s[80] + s.slice(16, 80).join('') + s[15]

@vanilla38
Copy link

@vanilla38 vanilla38 commented Aug 1, 2013

thanks alot btw, got any way to extract signatures ? in order to put in in this function ?

@mikeygao
Copy link
Author

@mikeygao mikeygao commented Aug 1, 2013

Great! It works again! Thank you so much for your wonderful done!

@AppliedEllipsis
Copy link

@AppliedEllipsis AppliedEllipsis commented Aug 2, 2013

Pretty much a 1-1 conversion of speedyapocalypse's function for python, seems to work great.
Just replace the function in youtube.py

    def _decrypt_signature(self, s):
        """Turn the encrypted s field into a working signature"""
        s = list(s)
        s = s[::-1]
        s = s[2:]
        b = s[0]
        s[0] = s[65 % len(s)]
        s[65] = b
        return ''.join(s[::-1])

compressed a little

    def _decrypt_signature(self, s):
        """Turn the encrypted s field into a working signature"""
        s = list(s)[::-1][2:]
        b = s[0]
        s[0] = s[65 % len(s)]
        s[65] = b
        return ''.join(s[::-1])

or even

    def _decrypt_signature(self, s):
        """Turn the encrypted s field into a working signature"""
        s = list(s)[-3::-1]
        b = s[0]
        s[0] = s[65 % len(s)]
        s[65] = b
        return ''.join(s[::-1])
@jaimeMF jaimeMF closed this in 04bca64 Aug 2, 2013
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Aug 2, 2013

Fixed, thanks for the report and for the algo.
@patrickslin thanks for the work. For other time, feel free to create a pull request, even if you just change the algo in _decrypt_signature, we'll update the signature tests and it will be much faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.