Jump to content
Sign in to follow this  
Armand

IE - parsing JS through it...

Recommended Posts

Armand

hi there,

Code:

#include <IE.au3> 
$CheckVar = 'hTtqsTm"7PCR9sHBReqsbi_Ywrko4yLiKZFwNw88ZhbRuHHM41J33K9wvAFPcWJ_8CoOGm8EVWte_mRFiO_VSYtrVhp_WBwltRhtIN1krzU__MxqBeQiCku3G71pGlER_sfoXQr9RCfZ2xM49WuS1oxe6AnuH37hTzk7udxEN0P6q6Ob1wQjPEVDjqOxc"_ECmXkrzRvsj"l5UQPmeApOqtAZmKmebJLX8GtfN9t3D1x6n7creZyyVd'
$SSJS = '<HTML><HEAD></HEAD><BODY>'& @CRLF & _
    '<textarea id="DownloadDet" cols="80" style="height:80;"></textarea>'& @CRLF & _
    '<script type="text/javascript">'& @CRLF & _
    "b64s = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"&'"'&"';"& @CRLF & _
    "text = base64ToText('"&$CheckVar&"');"& @CRLF & _
    'document.getElementById("DownloadDet").value = enc(text);'& @CRLF & _
    'function base64ToText(t)'& @CRLF & _
    '{'& @CRLF & _
    '   var r=""; var m=0; var a=0; var c;'& @CRLF & _
    '   for(n=0; n<t.length; n++)'& @CRLF & _
    '   {'& @CRLF & _
    '       c=b64s.indexOf(t.charAt(n));'& @CRLF & _
    '       if(c >= 0)'& @CRLF & _
    '       {'& @CRLF & _
    '           if(m)'& @CRLF & _
    '               r+=String.fromCharCode((c << (8-m))&255 | a);'& @CRLF & _
    '               a = c >> m;'& @CRLF & _
    '               m+=2;'& @CRLF & _
    '               if(m==8)'& @CRLF & _
    '                   m=0;'& @CRLF & _
    '       }'& @CRLF & _
    '   }'& @CRLF & _
    '   return r;'& @CRLF & _
    '}'& @CRLF & _
    'function enc(text){'& @CRLF & _
    '   fQRco=new Array();'& @CRLF & _
    '   IxH=223;'& @CRLF & _
    '   for(oKsC=0;oKsC<IxH;oKsC++){'& @CRLF & _
    '       fQRco[oKsC]=oKsC;'& @CRLF & _
    '   }'& @CRLF & _
    '   lTxoBV="2JtZU";'& @CRLF & _
    '   for(JIJW=0,UqE=JIJW,zjoTQq=fQRco;JIJW<IxH;JIJW++){'& @CRLF & _
    '       CHK = lTxoBV.charCodeAt(JIJW%lTxoBV.length);'& @CRLF & _
    '       UqE=(CHK+zjoTQq[JIJW]+UqE)%IxH;'& @CRLF & _
    '       Zlbt=zjoTQq[JIJW];'& @CRLF & _
    '       zjoTQq[JIJW]=zjoTQq[UqE];'& @CRLF & _
    '       zjoTQq[UqE]=Zlbt;'& @CRLF & _
    '       zjoTQq[UqE]=zjoTQq[UqE]^5;'& @CRLF & _
    '   }'& @CRLF & _
    '   for(ptuHcb="",UqE=0,gphhIM=0;gphhIM<text.length;gphhIM++){'& @CRLF & _
    '       SGn=gphhIM%IxH;'& @CRLF & _
    '       UqE=(zjoTQq[SGn]+UqE)%IxH;'& @CRLF & _
    '       lkkzT=zjoTQq[SGn];'& @CRLF & _
    '       zjoTQq[SGn]=zjoTQq[UqE];'& @CRLF & _
    '       zjoTQq[UqE]=lkkzT;'& @CRLF & _
    '       ASC = text.charCodeAt(gphhIM);'& @CRLF & _
    '       ptuHcb+=String.fromCharCode((ASC^zjoTQq[(zjoTQq[SGn]+zjoTQq[UqE])%IxH]));'& @CRLF & _
    '   }'& @CRLF & _
    'return ptuHcb;'& @CRLF & _
    '}'& @CRLF & _
'</script></BODY></HTML>'

$Fhnd = FileOpen("ProcessJS.html", 10)
FileWrite($Fhnd, $SSJS)
FileClose($Fhnd)
$IEO = _IECreate(@ScriptDir&"\ProcessJS.html", 0, 1, 1, 0)
Sleep(5000)
ConsoleWrite($IEO.document.getElementById("DownloadDet").value)

how can i get that annoying ActiveX protection blocker to go away ?!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites
ProgAndy

Just use the ScriptControl Object :mellow:

Local $SC = ObjCreate("ScriptControl")
$SC.Language="JScript"
$SC.addcode(   "b64s = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"&'"'&"';"& @CRLF & _
    'function base64ToText(t)'& @CRLF & _
    '{'& @CRLF & _
    '   var r=""; var m=0; var a=0; var c;'& @CRLF & _
    '   for(n=0; n<t.length; n++)'& @CRLF & _
    '   {'& @CRLF & _
    '      c=b64s.indexOf(t.charAt(n));'& @CRLF & _
    '      if(c >= 0)'& @CRLF & _
    '      {'& @CRLF & _
    '         if(m)'& @CRLF & _
    '            r+=String.fromCharCode((c << (8-m))&255 | a);'& @CRLF & _
    '            a = c >> m;'& @CRLF & _
    '            m+=2;'& @CRLF & _
    '            if(m==8)'& @CRLF & _
    '               m=0;'& @CRLF & _
    '      }'& @CRLF & _
    '   }'& @CRLF & _
    '   return r;'& @CRLF & _
    '}'& @CRLF & _
    'function enc(text){'& @CRLF & _
    '   fQRco=new Array();'& @CRLF & _
    '   IxH=223;'& @CRLF & _
    '   for(oKsC=0;oKsC<IxH;oKsC++){'& @CRLF & _
    '      fQRco[oKsC]=oKsC;'& @CRLF & _
    '   }'& @CRLF & _
    '   lTxoBV="2JtZU";'& @CRLF & _
    '   for(JIJW=0,UqE=JIJW,zjoTQq=fQRco;JIJW<IxH;JIJW++){'& @CRLF & _
    '      CHK = lTxoBV.charCodeAt(JIJW%lTxoBV.length);'& @CRLF & _
    '      UqE=(CHK+zjoTQq[JIJW]+UqE)%IxH;'& @CRLF & _
    '      Zlbt=zjoTQq[JIJW];'& @CRLF & _
    '      zjoTQq[JIJW]=zjoTQq[UqE];'& @CRLF & _
    '      zjoTQq[UqE]=Zlbt;'& @CRLF & _
    '      zjoTQq[UqE]=zjoTQq[UqE]^5;'& @CRLF & _
    '   }'& @CRLF & _
    '   for(ptuHcb="",UqE=0,gphhIM=0;gphhIM<text.length;gphhIM++){'& @CRLF & _
    '      SGn=gphhIM%IxH;'& @CRLF & _
    '      UqE=(zjoTQq[SGn]+UqE)%IxH;'& @CRLF & _
    '      lkkzT=zjoTQq[SGn];'& @CRLF & _
    '      zjoTQq[SGn]=zjoTQq[UqE];'& @CRLF & _
    '      zjoTQq[UqE]=lkkzT;'& @CRLF & _
    '      ASC = text.charCodeAt(gphhIM);'& @CRLF & _
    '      ptuHcb+=String.fromCharCode((ASC^zjoTQq[(zjoTQq[SGn]+zjoTQq[UqE])%IxH]));'& @CRLF & _
    '   }'& @CRLF & _
    'return ptuHcb;'& @CRLF & _
    '}'& @CRLF )
    
$CheckVar = 'hTtqsTm"7PCR9sHBReqsbi_Ywrko4yLiKZFwNw88ZhbRuHHM41J33K9wvAFPcWJ_8CoOGm8EVWte_mRFiO_VSYtrVhp_WBwltRhtIN1krzU__MxqBeQiCku3G71pGlER_sfoXQr9RCfZ2xM49WuS1oxe6AnuH37hTzk7udxEN0P6q6Ob1wQjPEVDjqOxc"_ECmXkrzRvsj"l5UQPmeApOqtAZmKmebJLX8GtfN9t3D1x6n7creZyyVd'
$ret = $SC.Eval("enc(base64ToText('"&$CheckVar&"'))")
MsgBox(0, '', $ret)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
Armand

HEHE.... GREAT MATE !!!!!!

THANKS !!!!!

@Volly

it's not german, these are just some hyper-annoying variables used in there....

Edited by Armand

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.