ich komm bei diesem script nicht weiter, kann mir wer sagen was ich falsch gemacht habe/bzw verbessern könnte. Ich weiß auch nicht wie ich es hinbekomme das ich weiß ob sich mein script wirklich einloggt. Weiterhin wollte ich fragen warum in der cxy.html der loginname nicht mitangezeigt wird?
PHP Code:
if FileExists(@scriptdir&"\result.html") Then
FileDelete(@scriptdir&"\result.html")
endif
if FileExists(@scriptdir&"\result2.html") Then
FileDelete(@scriptdir&"\result2.html")
endif
#include <file.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("Howrse Bot", 357, 196, 302, 218)
$Button1 = GUICtrlCreateButton("Refresh", 272, 16, 75, 25)
$Button2 = GUICtrlCreateButton("Cancel", 272, 48, 75, 25)
$List1 = GUICtrlCreateList("", 8, 8, 257, 175)
GUICtrlSetData(-1, "")
GUISetState(@SW_SHOW)
global $loginpost, $loginname, $i, $IDs, $loginname
$loginpasswort = "12345"
$IDs = FileOpen(@ScriptDir & "\Howrse.txt")
$loginname = FileReadLine($IDs, $i)
$loginpost = "login="&$loginname&"&password="&$loginpasswort&"&"
$loginpacket = "POST /site/doLogIn HTTP/1.1"&@crlf & _
"Host: www.howrse.de"&@crlf & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18"&@crlf & _
"Accept: text/javascript, text/html, application/xml, text/xml, */*"&@crlf & _
"Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3"&@crlf & _
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"&@crlf & _
"Keep-Alive: 115"&@crlf & _
"Connection: keep-alive"&@crlf & _
"X-Requested-With: XMLHttpRequest"&@crlf & _
"X-Prototype-Version: 1.6.0.3"&@crlf & _
"Content-Type: application/x-www-form-urlencoded; charset=UTF-8"&@crlf & _
"Referer: http://www.howrse.de/"&@crlf & _
"Content-Length: 33" &@crlf & _
"Cookie: __utma=160524324.231732259.1310376628.1311365671.1311372562.13; __utmz=160524324.1311372562.13.13.utmgclid=COjR_a39-KkCFQIt3wodRmtsYg|utmccn=(not%20set)|utmcmd=(not%20set); dispay-ad-logout=1; POPUPCHECK=1311443688025; landing=Beerbaum; fbsetting_06d1217fe98cadd217b3525be733bf11=%7B%22connectState%22%3A3%2C%22oneLineStorySetting%22%3A3%2C%22shortStorySetting%22%3A3%2C%22inFacebook%22%3Afalse%7D; PHPSESSID=juq0e7ci7kvduqqkj66c6q9e14; __utmb=160524324.1.10.1311372562; __utmc=160524324; base_domain_06d1217fe98cadd217b3525be733bf11=howrse.de"&@crlf & _
"Pragma: no-cache"&@crlf & _
"Cache-Control: no-cache" &@crlf &@crlf & $loginpost
$packet = "GET /landing/Beerbaum?gclid=COjR_a39-KkCFQIt3wodRmtsYg HTTP/1.1" &@crlf & _
"Host: www.howrse.de" &@crlf & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18"&@crlf & _
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"&@crlf & _
"Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3"&@crlf& _
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"&@crlf& _
"Keep-Alive: 115"&@crlf& _
"Connection: keep-alive"&@crlf & @crlf
$logoutpacket = "GET /site/doLogOut HTTP/1.1"&@crlf & _
"Host: www.howrse.de"&@crlf & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18"&@crlf & _
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"&@crlf & _
"Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3"&@crlf & _
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"&@crlf & _
"Keep-Alive: 115"&@crlf & _
"Connection: keep-alive"&@crlf & _
"Referer: http://www.howrse.de/jeu/?identification=1"&@crlf & @crlf
Do
$Msg = GUIGetMsg()
If $Msg == $Button1 Then
GUICtrlSetState($button2, $GUI_DISABLE)
TCPStartup()
;-----------------------------------------------------------Daten
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@SEC&"]"&" Preparing login...")
$count= _FileCountLines(@scriptdir&"\Howrse.txt")
GUICtrlSetData($button2, $count)
sleep(1300)
if @error then
msgbox(16, "Error", "Failure in reading Howrse.txt!")
endif
for $i = 1 to $count
;-----------------------------------------------------------Howrse startseite laden
$socket = TCPConnect("89.31.146.35", 80)
$sent= tcpsend($socket, $packet)
do
$recv = TCPRecv($socket, 800)
until $recv = ""
do
$recv &= TCPRecv($socket, 800)
until @error or StringInStr($recv, "</html>")
if $recv = "" Then
FileWrite(@scriptdir&"\result.html", "Failure")
Else
FileWrite(@scriptdir&"\result.html", $recv)
endif
;-----------------------------------------------------------Login
sleep(500)
$sentlogin= tcpsend($socket, $loginpacket)
if $sentlogin = "" Then
FileWrite(@scriptdir&"\result2.html", "Failure")
Else
FileWrite(@scriptdir&"\result2.html", $sentlogin)
endif
FileWrite(@scriptdir&"\cxy.html", $loginpacket)
do
$recv2 = TCPRecv($socket, 1024)
until $recv2 = ""
do
$recv2 &= TCPRecv($socket, 1024)
until @error or StringInStr($recv2, "</html>")
if $recv2 = "" Then
FileWrite(@scriptdir&"\result2.html", "Failure")
Else
FileWrite(@scriptdir&"\result2.html", $recv2)
endif
GUICtrlSetData($list1, "["&@hour&":"&@min&":"&@SEC&"]"&" "&$loginname&" logged in."&@crlf)
;-----------------------------------------------------------Logout
$sentlogout= tcpsend($socket, $logoutpacket)
GUICtrlSetdata($button2, $count-$i)
TCPCloseSocket($socket)
Next
FileClose(@ScriptDir & "\Howrse.txt")
TCPShutdown()
GUICtrlSetState($button2, $GUI_ENABLE)
endif
if $msg == $button2 Then
Exit
endif
Until $Msg == -3
Code:
login=&password=12345&






u t o it b o t. de finden, dort habe ich auch alles darüber erfahren
