Youtube decipher signature not working as expected

牧云@^-^@ 提交于 2019-12-11 20:42:33

问题


Hi i am trying to decipher the signature present in youtube page.I passed the orginal signature to below function as its there in youtube html5player js(http://s.ytimg.com/yts/jsbin/html5player-en_US-vflr38Js6/html5player.js) .but this function just removes first and last two characters.Am i missing any steps please enlighten me.Thanks.

var ar = {
    KF: function(a, b) {
        a.splice(0, b);
    },
    Xm: function(a) {
        a.reverse();
    },
    BT: function(a, b) {
        var c = a[0];
        a[0] = a[b % a.length];
        a[b] = c;
    }
};

function br(a) {
    a = a.split("");

    ar.BT(a, 63);
    ar.KF(a, 1);
    ar.Xm(a, 43);
    ar.BT(a, 46);
    ar.KF(a, 2);
    ar.Xm(a, 0);
    ar.KF(a, 3);
    return a.join("")
};

console.log(br("6A51A51911872F6C22D0BD925F0AC6865F8BBB63AE24.8933FFE6E311091075A664E5B940181409139CEAE0"));

orginal :

6A51A51911872F6C22D0BD925F0AC6865F8BBB63AE24.8933FFE6E311091075A664E5B940181409139CEAE0

result :

A51911872F6C22D0BD925F0AC6865F8BBB630E24.8933FFE6E3110910756664E5B940181409139CEA

Expected result is something like below:

8C06A0DDD566FD3C3B278CFD2BFE39AFD8A0B5C3.3AFF1E5C1C378DB9751628A61FEE0130041F556F

回答1:


The deciphered signature is correct. You are doing it right but always remember to use the latest algorithm to decrypt the ciphered signature. Here I can see that you are using old HTML5 js player file. So if you are using the old file then the decrypted signature will not work for videos.



来源:https://stackoverflow.com/questions/27075790/youtube-decipher-signature-not-working-as-expected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!