B站API更新,Biligrab只能使用falloff模式

本版本过旧,我不再提供支持!请看最新的发布版本!

(早猜出来了,看最新code。。。)
 
猜不出sign是怎么做的。
http://interface.bilibili.com/playurl?cid=1338722&player=1&ts=1406832881&sign=7037e644d3b4159c80372af8bd6fff72
求大家一起动手。

22 thoughts on “B站API更新,Biligrab只能使用falloff模式

          1. xiao

            我在你代码里面只看到带appkey的 sign_this = calc_sign(‘appkey={APPKEY}&cid={cid}
            就像你那例子 参数里面不带appkey
            http://interface.bilibili.com/playurl?cid=1338722&player=1&ts=1406832881&sign=7037e644d3b4159c80372af8bd6fff72
            不带appkey的情况下
            md5(cid=1338722&player=1&ts=1406832881)
            可得不到 7037e644d3b4159c80372af8bd6fff72
            当然带key 连sign都不用验证就能直接访问 但不是想要这种方法 是想知道上面那种不带key的算法
            http://interface.bilibili.com/playurl?cid=1338722&appkey=85eb6835b0a1034e

  1. xiao

    我在你代码里面只看到带appkey的 sign_this = calc_sign(‘appkey={APPKEY}&cid={cid}
    就像你那例子 参数里面不带appkey
    http://interface.bilibili.com/playurl?cid=1338722&player=1&ts=1406832881&sign=7037e644d3b4159c80372af8bd6fff72
    不带appkey的情况下
    md5(cid=1338722&player=1&ts=1406832881)
    可得不到 7037e644d3b4159c80372af8bd6fff72
    当然带key 连sign都不用验证就能直接访问 但不是想要这种结果 是要上面那种不带key的算法
    http://interface.bilibili.com/playurl?cid=1338722&appkey=85eb6835b0a1034e

    Reply
    1. Beining Post author

      重复一次:这个版本已经很老了,我不再提供支持。
      如果有问题,请参照最新版本。
      他的计算应该加上了所有参数。

      Reply
  2. hihi427

    你把b站播放器 的play.swf 反编译一下 里边getsign的function 看看应该就能明白怎么算的了吧
    这里大概贴一点 不完整的
    package com.bilibili.interfaces {
    public function getSign(_arg1:string):string{ var _local4:int; var _local2 = null; var _local26:int; var _local25:int; var _local19:int; var _local15:int; var _local14:int; var _local7:int; var _local22:int; var _local16:int; var _local13:int; var _local27:int; var _local11:int; var _local23:int; var _local12:int; var _local18:int; var _local17:int; var _local20:int; var _local3:int = ESP; _local4 = _local3; _local3 = (_local3 – 160); _local11 = 16; _local27 = (_local4 – 153); ESP = (_local3 & -16); _local26 = CModule.mallocString(_arg1); _local25 = _arg1.length; var _local24:int = (L__2E_str3 – _local11); _local24 = op_li8((_local24 + 16)) /*Alchemy*/ ; _local3 = (_local3 – 16); op_si32(_local24, (_local3 + 4)); //Alchemy op_si32(_local27, _local3); //Alchemy ESP = _local3; F_sprintf(); _local3 = (_local3 + 16); _local11 = (_local11 + -1); _local27 = (_local27 + 2); //unresolved if _local11 = 0; _local27 = _local11; if (_local25 != 0){ _local11 = 0; _local27 = 0; if (_local25 = 1){ _local22 = _local20; _local18 = _local16; _local19 = _local17; _local24 = (_local26 + _local18); _local17 = op_li8(_local24) /*Alchemy*/ ; if (_local17 != 38){ if (_local17 != 61){ _local16 = (_local18 + 1); _local17 = _local19; _local20 = _local22; //unresolved jump }; _local12 = (_local26 + _local19); _local24 = (_local11 + (_local7 << 4)); op_si32(_local12, _local24); //Alchemy _local13 = (_local18 – _local19); op_si32(_local13, (_local24 + 4)); //Alchemy _local16 = (_local18 + 1); _local20 = 1; _local17 = _local16; //unresolved if _local18 = L__2E_str1; _local19 = op_li8(_local12) /*Alchemy*/ ; _local24 = op_li8(_local18) /*Alchemy*/ ; _local17 = _local16; _local20 = _local22; //unresolved if _local20 = 1; _local17 = _local16; //unresolved if _local12 = (_local12 + 1); _local18 = (_local18 + 1); _local13 = (_local13 + -1); _local20 = 1; _local17 = _local16; //unresolved if //unresolved jump }; _local24 = (_local11 + (_local7 << 4)); op_si32((_local26 + _local19), (_local24 + 8)); //Alchemy _local21 = (_local18 – _local19); op_si32(_local21, (_local24 + 12)); //Alchemy _local16 = (_local18 + 1); _local7 = (_local7 + 1); _local17 = _local16; _local20 = _local22; //unresolved if _local22 = _local7; if (_local17 != _local25){ _local21 = (_local11 + (_local7 <= 19){ _local23 = (_local23 / 10); //unresolved if }; _local23 = (0 – _local7); }; op_si8(_local25, _ts_2E_2596); //Alchemy _local25 = (_buf_2E_2569 + _local23); _local23 = (_ts_2E_2596 + 1); _local24 = op_li8(_local25) /*Alchemy*/ ; op_si8(_local24, _local23); //Alchemy _local25 = (_local25 + 1); _local23 = (_local23 + 1); //unresolved if _local23 = (_local11 + (_local22 << 4)); op_si32(L__2E_str1, _local23); //Alchemy op_si32(2, (_local23 + 4)); //Alchemy op_si32(_ts_2E_2596, (_local23 + 8)); //Alchemy _local22 = (_ts_2E_2596 & -4); _local21 = op_li32(_local22) /*Alchemy*/ ; var _temp1 = (_local21 + -16843009); _local21 = (_local21 & -2139062144); _local21 = (_local21 ^ -2139062144); _local25 = (_local22 + 4); _local7 = 0; if ((_local21 & _temp1) != 0){ while ((_local17 = (_ts_2E_2596 + _local7)) < (_local25 = (_local22 + 4))) { _local24 = op_li8(_local17) /*Alchemy*/ ; //unresolved if _local7 = (_local7 + 1); }; }; _local7 = op_li32(_local25) /*Alchemy*/ ; _local24 = (_local7 + -16843009); _local21 = (_local7 & -2139062144); _local21 = (_local21 ^ -2139062144); _local24 = (_local21 & _local24); if (_local24 != 0){ _local24 = (_local7 & 0xFF); if (_local24 == 0){ _local7 = (_local25 – _ts_2E_2596); //unresolved jump }; _local24 = op_li8((_local25 + 1)) /*Alchemy*/ ; if (_local24 == 0){ _local7 = (_local25 + (1 – _ts_2E_2596)); //unresolved jump }; _local24 = op_li8((_local25 + 2)) /*Alchemy*/ ; if (_local24 == 0){ _local7 = (_local25 + (2 – _ts_2E_2596)); //unresolved jump }; _local24 = op_li8((_local25 + 3)) /*Alchemy*/ ; if (_local24 == 0){ _local7 = (_local25 + (3 – _ts_2E_2596)); //unresolved jump }; }; _local25 = (_local25 + 4); //unresolved jump op_si32(_local7, (_local23 + 12)); //Alchemy _local23 = 1; if (_local27 == 1){ _local27 = 38; _local25 = 0; //unresolved jump }; }; _local7 = 1; //unresolved jump _local20 = (_local11 + (_local12 << 2)); _local14 = op_li32(_local20) /*Alchemy*/ ; _local24 = (_local14 + _local25); _local19 = op_sxi8(op_li8(_local24) /*Alchemy*/ ) /*Alchemy*/ ; _local16 = (_local11 + (_local12 << 2)); _local23 = op_li32((_local16 – 16)) /*Alchemy*/ ; _local24 = (_local23 + _local25); _local15 = op_sxi8(op_li8(_local24) /*Alchemy*/ ) /*Alchemy*/ ; if (_local15 <= _local19){ var _temp2 = (_local19 & 0xFF); _local24 = (_local15 & 0xFF); //unresolved if _local25 = (_local25 + 1); if (_local25 < _local18){ //unresolved if _local13 = (_local11 + (_local12 << 2)); _local18 = op_li32((_local13 + 4)) /*Alchemy*/ ; //unresolved if //unresolved jump }; }; _local24 = (_local12 << 2); var _local10:int = (_local11 + _local24); _local24 = op_li32((_local10 + 12)) /*Alchemy*/ ; _local21 = (_local12 << 2); var _local8:int = (_local11 + _local21); _local21 = op_li32((_local8 + 8)) /*Alchemy*/ ; op_si32(_local23, _local20); //Alchemy op_si32(_local22, (_local13 + 4)); //Alchemy var _local6 = (_local12 << 2); _local6 = (_local11 + _local6); var _local5 = op_li32((_local6 – 8)) /*Alchemy*/ ; op_si32(_local5, (_local8 + 8)); //Alchemy _local8 = (_local12 << 2); _local8 = (_local11 + _local8); _local5 = op_li32((_local8 – 4)) /*Alchemy*/ ; op_si32(_local5, (_local10 + 12)); //Alchemy op_si32(_local14, (_local16 – 16)); //Alchemy _local10 = (_local12 << 2); _local10 = (_local11 + _local10); op_si32(_local18, (_local10 – 12)); //Alchemy op_si32(_local21, (_local6 – 8)); //Alchemy op_si32(_local24, (_local8 – 4)); //Alchemy _local17 = (_local17 + 1); if (_local27 != _local17){ _local24 = (_local17 << 4); _local24 = (_local11 + _local24); _local22 = op_li32((_local24 – 12)) /*Alchemy*/ ; _local12 = (_local17 << 2); _local25 = 0; //unresolved jump }; _local7 = (_local7 + 1); if (_local27 != _local7){ _local17 = 1; //unresolved jump }; _local23 = _local27; //unresolved if _local3 = (_local3 – 16); op_si32(38, _local3); //Alchemy ESP = _local3; F_malloc(); _local3 = (_local3 + 16); _local27 = eax; _local25 = _local27; //unresolved jump _local24 = (_local25 << 4); _local24 = (_local11 + _local24); _local21 = op_li32((_local24 + 4)) /*Alchemy*/ ; _local21 = (_local27 + _local21); _local24 = op_li32((_local24 + 12)) /*Alchemy*/ ; _local24 = (_local21 + _local24); _local27 = (_local24 + 2); _local25 = (_local25 + 1); //unresolved if _local3 = (_local3 – 16); op_si32(_local27, _local3); //Alchemy ESP = _local3; F_malloc(); _local7 = 0; _local3 = (_local3 + 16); _local27 = eax; _local25 = _local27; _local24 = (_local7 << 4); _local24 = (_local11 + _local24); _local21 = op_li32(_local24) /*Alchemy*/ ; _local10 = op_li32((_local24 + 4)) /*Alchemy*/ ; _local3 = (_local3 – 16); op_si32(_local10, (_local3 + 8)); //Alchemy op_si32(_local21, (_local3 + 4)); //Alchemy op_si32(_local25, _local3); //Alchemy ESP = _local3; Fmemcpy(); _local3 = (_local3 + 16); _local21 = op_li32((_local24 + 4)) /*Alchemy*/ ; _local10 = (_local25 + _local21); op_si8(61, _local10); //Alchemy _local6 = op_li32((_local24 + 8)) /*Alchemy*/ ; _local10 = op_li32((_local24 + 12)) /*Al

    Reply
        1. Beining Post author

          sign_this = calc_sign('appkey={APPKEY}&cid={cid}{SECRETKEY}'.format(APPKEY = APPKEY, cid = cid, SECRETKEY = SECRETKEY))
          #----------------------------------------------------------------------
          def calc_sign(string):
          """str/any->str
          return MD5."""
          return str(hashlib.md5(str(string).encode('utf-8')).hexdigest())

          我用FFDec.

          Reply
          1. Beining Post author

            这个版本太旧了,我不再提供支持了。
            里面的函数很多都重写了。
            请看最新版,thx。

    1. hacs

      请问用什么工具反汇编的? 我用的工具 找不到getSign函数的具体实现 package com.bilibili.interfaces 下面也没有 只找到在其他地方调用的

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *