Решение для Delphi
Зависимости: ActiveX, SHDocVw, MSHTML, установленный Internet Explorer версии 5.0 и выше
Автор: BenLadenBest
Дата: 22 декабря 2009 17:30
function decode_hash (script:widestring; hash:string):string;
var
WB:TWebBrowser;
Document:IHTMLDocument2;
V:OleVariant;
text:string;
begin
wb:=TWebBrowser.Create(nil);
text:='<html><head>'+
script+
'</head><body><script type="text/javascript">document.write(decode_hash('''+hash+'' '))</script></body></html>';
if WB.Document = nil then
WB.Navigate('about
:blank');
while WB.Document = nil do
Application.ProcessMessages;
Document := WB.Document as IHtmlDocument2;
V := VarArrayCreate([0, 0], varVariant);
V[0] := Text;
document.Write(PSafeArray(TVarData(v).VArray));
document.Close;
result := (document.all.Item(NULL, 0)
as IHTMLElement).innerText;
wb.Free;
end;
//используем
procedure TForm1.Button3Click(Sender: TObject);
var
sc:string;
begin
//Парсим со страницы скрипт декодирования
sc:='<script type="text/javascript">window.decode_hash = function(hash){return (function(__){'+
'return _(__,8,_____(__)-12)+_(__,0,5);})((function(__){____='''';for(___=0 ;___<_____(__);++___)____+=______(__,_____(__)-___-1);return ____;})'+
'((function(__){____='''';for(___=0;___<_____(__); ++___)____+=(function(__){return __>109?(119-__):String.fromCharCode(__);})(__.charCodeAt(___)) ;return ____;})((function(__){______=function(__,___){retu rn __.charAt(___);};_____=function(__)'+
'{return __.length;};____=(_=function(_,__,___){____='''';( ___=___?________(_)-__));for(;___;--___)____+=(function(_,__){return ______(_,__)})(_,__++);return ____;})(__,3,3);____+=_(__,0,2)+_(__,8);return ____;})(hash))));};</script>';
//Передаем в функцию
showmessage (decode_hash (sc,'bf3539cf65cda089fa'));
end;
свой софт обновлю чуть позже, не паникуйте
