xbayrockx Posted July 30, 2011 Share Posted July 30, 2011 (edited) Here is a link to a picture of my desktop which shows all the code and the output.As you can see in wireshark the server is sending me back a packet which details the success of the login attempt however the AutoIt output is giving me pretty much nothing. This script use to work (sometimes) and sometimes this problem occurred.Anyone know what's going on?#include "md5.au3"Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")$username = "user"$password = "pass"$password_MD5 = md5($password)Func _HTTPRequest($oHTTP, $oMethod, $oURL, $oData = "") $oHTTP.Open($oMethod, $oURL, False) $oHTTP.SetRequestHeader("User-Agent", "S2 Games/Heroes of Newerth/2.1.0.1/wac/i686") $oHTTP.SetRequestHeader("Accept-Encoding", "gzip, deflate") $oHTTP.SetRequestHeader("Connection", "Close") $oHTTP.SetRequestHeader("Accept", "*/*") If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($oData) EndIf ConsoleWrite("STATUS:" & @CRLF) ConsoleWrite($oHTTP.status & @CRLF) ConsoleWrite($oHTTP.statustext & @CRLF) ConsoleWrite("HEADERS:" & @CRLF) ConsoleWrite($oHTTP.GetAllResponseHeaders() & @CRLF) ConsoleWrite("RESPONSE:" & @CRLF) ConsoleWrite($oHTTP.ResponseText & @CRLF) Return $oHTTP.ResponseText()EndFunc $url = "http://199.7.76.170/client_requester.php";url = "http://masterserver.hon.s2games.com/client_requester.php"$data = "f=auth&login=" & $username & "&password=" & $password_MD5 $httpReturn = _HTTPRequest($oHTTP, "POST", $url, $data);ConsoleWrite($httpReturn);If StringInStr($httpReturn, "Invalid") Then ;ConsoleWrite("Fail" & @CRLF);EndIf;If StringInStr($httpReturn, "super_id") Then ;ConsoleWrite("Success" & @CRLF);EndIfIf stringlen($httpReturn) > 100 Then ConsoleWrite("Success" & @CRLF)Else ConsoleWrite("Fail" & @CRLF)EndIf Edited July 30, 2011 by xbayrockx Link to comment Share on other sites More sharing options...
Zedna Posted July 30, 2011 Share Posted July 30, 2011 Read forum rules. Game related posts are forbidden here. Topic reported. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts