1
jacy OP 长的英文不会自动换行啊-_-||
双击复制下来,粘贴到回复框看完整的数据 |
2
jacy OP 经过反编译,确实不是常用编码,是虾米自己的算法,找到as文件了,不太会,谁翻译一下
package xiami { import com.adobe.serialization.json.*; import flash.events.*; import flash.net.*; public class HQlocationDecode extends EventDispatcher { private var _url:String; private var _isHQ:Boolean; private static const getHQlocationUrl:String = "http://www.xiami.com/song/gethqsong/sid/"; private static const getTrylocationUrl:String = "http://www.xiami.com/song/gethqsong"; public function HQlocationDecode() { return; }// end function public function getTryLoation(param1:int, param2:String = null, param3:int = 0) : void { var _loc_4:* = new URLRequest(getTrylocationUrl); var _loc_5:* = new URLVariables(); new URLVariables().sid = param1; _loc_5.type = param2; _loc_5.typeId = param3; _loc_4.data = _loc_5; var _loc_6:* = new URLLoader(); new URLLoader().addEventListener(Event.COMPLETE, this.loadCompleteHandler); _loc_6.addEventListener(IOErrorEvent.IO_ERROR, this.errorHandler); _loc_6.load(_loc_4); return; }// end function public function getHQLocation(param1:int, param2:String = null, param3:int = 0) : void { var _loc_4:* = new URLRequest(getHQlocationUrl + param1); var _loc_5:* = new URLLoader(); new URLLoader().addEventListener(Event.COMPLETE, this.loadCompleteHandler); _loc_5.addEventListener(IOErrorEvent.IO_ERROR, this.errorHandler); _loc_5.load(_loc_4); return; }// end function private function loadCompleteHandler(event:Event) : void { var _loc_4:* = undefined; var _loc_2:* = event.target.data; var _loc_3:* = JSON.decode(_loc_2).status; if (_loc_3 == 1) { this._isHQ = true; _loc_4 = JSON.decode(_loc_2).location; this._url = this.getLocation(_loc_4); } else { this._isHQ = false; this._url = null; } dispatchEvent(new Event(Event.COMPLETE)); return; }// end function private function errorHandler(event:Event) : void { this._isHQ = false; dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR)); return; }// end function public function get url() : String { return this._url; }// end function public function get isHQ() : Boolean { return this._isHQ; }// end function public function getLocation(param1:String) : String { var _loc_10:* = undefined; var _loc_2:* = Number(param1.charAt(0)); var _loc_3:* = param1.substring(1); var _loc_4:* = Math.floor(_loc_3.length / _loc_2); var _loc_5:* = _loc_3.length % _loc_2; var _loc_6:* = new Array(); var _loc_7:* = 0; while (_loc_7 < _loc_5) { if (_loc_6[_loc_7] == undefined) { _loc_6[_loc_7] = ""; } _loc_6[_loc_7] = _loc_3.substr((_loc_4 + 1) * _loc_7, (_loc_4 + 1)); _loc_7 = _loc_7 + 1; } _loc_7 = _loc_5; while (_loc_7 < _loc_2) { _loc_6[_loc_7] = _loc_3.substr(_loc_4 * (_loc_7 - _loc_5) + (_loc_4 + 1) * _loc_5, _loc_4); _loc_7 = _loc_7 + 1; } var _loc_8:* = ""; _loc_7 = 0; while (_loc_7 < _loc_6[0].length) { _loc_10 = 0; while (_loc_10 < _loc_6.length) { _loc_8 = _loc_8 + _loc_6[_loc_10].charAt(_loc_7); _loc_10 = _loc_10 + 1; } _loc_7 = _loc_7 + 1; } _loc_8 = unescape(_loc_8); var _loc_9:* = ""; _loc_7 = 0; while (_loc_7 < _loc_8.length) { if (_loc_8.charAt(_loc_7) == "^") { _loc_9 = _loc_9 + "0"; } else { _loc_9 = _loc_9 + _loc_8.charAt(_loc_7); } _loc_7 = _loc_7 + 1; } _loc_9 = _loc_9.replace("+", " "); return _loc_9; }// end function } } |
3
PeterD 2013-08-03 16:32:52 +08:00
|
4
dndx 2013-08-03 16:45:04 +08:00
|
5
pubby 2013-08-03 16:56:12 +08:00
还好了,算法是固定的,改写成你需要的语言就可以解码了。
以前破解百度指数算法的时候,他是每几小时随机变化的加解密算法,而且编译在swf文件里面。当时不得不对照《ActionScript Virtual Machine 2 (AVM2) Overview》写了个简单的ABC(ActionScript Byte Code)模拟器来解码 :( |
6
jjplay 2013-08-03 17:00:11 +08:00
很早 算不上研究,找到了3L 那人的文章,最终下载的还是低品质的~
|
7
jacy OP |