phew Posted November 7, 2007 Share Posted November 7, 2007 hi at first: yes i know its much ugly useless code (the rand stuff) and i'll change it by time. my problem is i dunno where the problem is! well after executing my script i do not receive anything from the server. here's the code: $site = 'siteaktion=anmelden&number1=&number2=&message=&number_anm1=%2B49' & StringLeft(StringTrimLeft(GUICtrlRead($num), 1), 3) & _ '&number_anm2=' & StringTrimLeft(GUICtrlRead($num), 4) & '&username=' & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1)) & _ Random(1, 9, 1) & Random(1, 9, 1) & Random(1, 9, 1) & Chr(Random(Asc("a"), Asc("z"), 1)) & '&Submit=ANMELDEN' $socket = TCPConnect(TCPNameToIP('www.futuresms.ch'), 80) $cmd &= 'POST /anmelden.php HTTP/1.1' & @CRLF $cmd &= 'Host: www.futuresms.ch' & @CRLF $cmd &= 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9' & @CRLF $cmd &= 'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5' & @CRLF $cmd &= 'Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3' & @CRLF $cmd &= 'Accept-Encoding: gzip,deflate' & @CRLF $cmd &= 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' & @CRLF $cmd &= 'Keep-Alive: 300' & @CRLF $cmd &= 'Connection: keep-alive' & @CRLF $cmd &= 'Referer: http://www.futuresms.ch/anmelden.php' & @CRLF $cmd &= 'Cookie: fsmsID=' & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1)) & Random(1, 9, 1) & Random(1, 9, 1) & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1)) & Random(1, 9, 1) & Random(1, 9, 1) & _ Random(1, 9, 1) & Random(1, 9, 1) & Chr(Random(Asc("a"), Asc("z"), 1)) & Random(1, 9, 1) & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1))& Chr(Random(Asc("a"), Asc("z"), 1)) & Random(1, 9, 1) & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1)) & _ Random(1, 9, 1) & Random(1, 9, 1) & Random(1, 9, 1) & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1)) & Random(1, 9, 1) & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1)) & _ Random(1, 9, 1) & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1)) & Random(1, 9, 1) & Random(1, 9, 1) & @CRLF $cmd &= 'Content-Type: application/x-www-form-urlencoded' & @CRLF $cmd &= 'Content-Length: ' & StringLen($site) & @CRLF $cmd &= $site $cmd &= '' & @CRLF TCPSend($socket, $cmd) $f = FileOpen("y.txt", 1) FileWrite($f, $cmd) FileClose($f) and here the parsed thing, my debugfile "y.txt": POST /anmelden.php HTTP/1.1 Host: www.futuresms.ch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://www.futuresms.ch/anmelden.php Cookie: fsmsID=zn44za9372m7xzz6ia724nx2hm9qon12 Content-Type: application/x-www-form-urlencoded Content-Length: 119 siteaktion=anmelden&number1=&number2=&message=&number_anm1=%2B49171&number_anm2=6544374&username=bw825t&Submit=ANMELDEN what am i doing wrong? greetings Link to comment Share on other sites More sharing options...
AzKay Posted November 7, 2007 Share Posted November 7, 2007 Alternatively; $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", "http://futuresms.ch/anmelden.php") $oHTTP.SetRequestHeader("Cookie", "fsmsID=zn44za9372m7xzz6ia724nx2hm9qon12") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send("siteaktion=anmelden&number1=&number2=&message=&number_anm1=%2B49171&number_anm2=6544374&username=bw825t&Submit=ANMELDEN") ConsoleWrite($oHTTP.ResponseText & @CRLF) # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
phew Posted November 7, 2007 Author Share Posted November 7, 2007 (edited) using your script: C:\Dokumente und Einstellungen\phew\Desktop\SMS\x.au3 (5) : ==> The requested action with this object has failed.: EDIT: got it! $cmd &= $site $cmd &= '' & @CRLF TCPSend($socket, $cmd) must be $cmd &= '' & @CRLF $cmd &= $site & @CRLF TCPSend($socket, $cmd) Edited November 7, 2007 by phew Link to comment Share on other sites More sharing options...
AzKay Posted November 7, 2007 Share Posted November 7, 2007 $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", "http://futuresms.ch/anmelden.php") $oHTTP.SetRequestHeader("Cookie", "fsmsID=zn44za9372m7xzz6ia724nx2hm9qon12") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send("siteaktion=anmelden&number1=&number2=&message=&number_anm1=%2B49171&number_anm2=6544374&username=bw825t&Submit=ANMELDEN") ConsoleWrite($oHTTP.ResponseText & @CRLF) Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"","We intercepted a COM Error !" & @CRLF & _ "Number is: " & $HexNumber & @CRLF & _ "Windescription is: " & $oMyError.windescription ) SetError(1) Endfunc # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now