Youtube解密签名不能按预期工作 [英] Youtube decipher signature not working as expected

查看:226
本文介绍了Youtube解密签名不能按预期工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试解密YouTube页面中的签名。我将原始签名传递给了下面的功能,如youtube html5player js( http://s.ytimg.com/yts/jsbin/html5player-en_US-vflr38Js6/html5player.js ),但这个功能只是删除第一个和最后两个字符。我没有任何步骤,请启发我。谢谢。

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"));

原文:

6A51A51911872F6C22D0BD925F0AC6865F8BBB63AE24.8933FFE6E311091075A664E5B940181409139CEAE0

结果:

A51911872F6C22D0BD925F0AC6865F8BBB630E24.8933FFE6E3110910756664E5B940181409139CEA

预期结果类似于以下:

8C06A0DDD566FD3C3B278CFD2BFE39AFD8A0B5C3.3AFF1E5C1C378DB9751628A61FEE0130041F556F


推荐答案

解密的签名是正确的。你做的正确,但总是记得使用最新的算法来解密加密的签名。在这里我可以看到你正在使用旧的HTML5 js播放器文件。因此,如果您使用旧的文件,则解密的签名将不适用于视频。

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.

这篇关于Youtube解密签名不能按预期工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆