PHP Code:
#include <String.au3>
#include<IE.au3>
HotKeySet("{ESC}","_Exit")
#notrayicon
sleep(1500)
FileDelete(@TempDir & "\update.txt")
InetGet("http://wrestlegame-bot.pytalhost.de/Wrestlegamebot/update.txt",@TempDir & "\update.txt", 1, 0)
$file = FileOpen(@TempDir & "\update.txt", 0)
$ver_server = FileReadLine($file, 1)
$ver_pc = IniRead("config.ini", "Info", "Version","")
If $ver_server = $ver_pc or $ver_server = "" Then
FileClose($file)
FileDelete(@TempDir & "\update.txt")
Else
$msgbox = MsgBox(36, "Update!", "Es ist ein neues Update verfügbar! Wollen sie es runterladen?")
If $msgbox = 6 Then
Tooltip("Update wird runtergeladen... bitte warten :-)")
ProcessClose ("Wrestlegame Bot 1.0.1.exe")
InetGet("http://wrestlegame-bot.pytalhost.de/Wrestlegamebot/Wrestlegame Bot 1.0.1.exe",@scriptDir&"\" & "Dein Bot", 1, 0)
IniWrite("config.ini", "Info", "Version", $ver_server)
FileClose($file)
FileDelete(@ScriptDir & "update.txt")
Tooltip("")
$mb = @InetGetBytesRead
$mb = $mb / 1000
$mb = StringLeft ($mb, 4)
msgbox(0,"Update", "Das Programm wurde aktualisiert ;)" & @LF & "Es wurden " & $mb & " mb empfangen.")
run("Wrestlegame Bot 1.0.1.exe")
EndIf
EndIf
;================Benutzername&Passwort speichern======================
$name=""
$pw=""
$name1=""
$pw1=""
$EncryptPW = "0175874"
$ini = "config.ini"
$iniread = IniRead($ini,"Nutzung","ja/nein","NotFound")
If $iniread = "ja" Then
$EncryName = IniRead($ini,"Login","Name","")
$EncryPW = IniRead($ini,"Login","PW","")
$name = _StringEncrypt(0, $EncryName, $EncryptPW, 7)
$pw = _StringEncrypt(0, $EncryPW, $EncryptPW, 7)
Else
Global $input[2]
$input[0] = InputBox("Username","Geben sie bitte hier ihren Benutzernamen ein", "","#" )
$input[1] = InputBox("Password","Geben sie bitte hier ihr Passwort ein", "", "#")
IniWrite($ini,"Login","Name",_StringEncrypt(1, $input[0], $EncryptPW, 3))
IniWrite($ini,"Login","PW",_StringEncrypt(1, $input[1], $EncryptPW, 3))
IniWrite($ini,"Nutzung","ja/nein","ja")
EndIf
Func _Exit()
Exit
EndFunc
;============================Login Script==========================================
$post = "username=" & $name1 & "&password=" & $pw1 & "&x=" & Random(10, 40, 1) & "&y=" & Random(5, 18, 1)
GuiCreate("Wrestlegame.de Bot",321,294,947,6)
$Start=GuiCtrlCreateButton("Start",6,38,131,42)
$choose=GuiCtrlCreateButton("Shows auswählen",7,85,130,39)
$info=GuiCtrlCreateButton("Anleitung",2,203,317,48)
$credits=GuiCtrlCreateButton("Credits",5,252,314,40)
$Exit=GuiCtrlCreateButton("Exit",170,40,122,150)
$link=GuiCtrlCreateButton("Settings Löschen",7,129,130,45)
$label1=GuiCtrlCreateLabel("Build No.0.0.1",110,6,54,15)
GuiSetState()
While 1
$msg=GuiGetMsg()
If $msg=-3 Then Exit
If $msg=$Start Then Start()
If $msg=$Exit Then EXITT()
If $msg=$credits Then Credits()
If $msg=$info Then Info()
If $msg=$link then link()
If $msg=$choose then choose()
Wend
Func Info()
MsgBox (0, "Anleitung", "1.Klicke auf Show wählen")
MsgBox (0, "Anleitung", "2.Klicke auf Start")
MsgBox (0, "Anleitung", "3.Es öffnet sich kein Fenster aber keine Angst zu diesem Zeitpunkt bottest du schon^^")
Endfunc
Func link()
Filedelete("config.ini")
ProcessClose ("Wrestlegame Bot 1.0.1.exe")
run("Wrestlegame Bot 1.0.1.exe")
Endfunc
Func choose()
Global $input[16];hier soll mann auswählen welche urls dann aufgerufen werden sollen
$input[2] = Inputbox ("Initiative","Ja oder Nein")
$input[3] = Inputbox("Accelerate","Ja oder Nein")
$input[4] = Inputbox("Night of Glory","Ja oder Nein")
$input[5] = Inputbox("Beatdown","Ja oder Nein")
$input[6] = Inputbox("War Zone","Ja oder Nein")
$input[7] = Inputbox("Wildcard Roulette","Ja oder Nein")
$input[8] = Inputbox("Doomsday Lite","Ja oder Nein")
$input[9] = Inputbox("Doomsday","Ja oder Nein")
$input[10] = Inputbox("Championsnite","Ja oder Nein")
$input[11] = Inputbox("TT-Accelerate","Ja oder Nein")
$input[12] = Inputbox("TT-Beatdowm","Ja oder Nein")
$input[13] = Inputbox("TT-War Zone","Ja oder Nein")
$input[14] = Inputbox("TT-Free 4 all","Ja oder Nein")
$input[15] = Inputbox("TT-Championsnite","Ja oder Nein")
IniWrite($ini,"Initiative","Ja oder Nein", $input[2])
iniwrite($ini, "Accelerate", "Ja oder Nein", $input[3])
IniWrite($ini,"Accelerate","Ja oder Nein", $input[3])
IniWrite($ini,"Night of Glory","Ja oder Nein", $input[4])
IniWrite($ini,"Beatdown","Ja oder Nein", $input[5])
IniWrite($ini,"War Zone","Ja oder Nein", $input[6])
IniWrite($ini,"Wildcard Roulette","Ja oder Nein", $input[7])
IniWrite($ini,"Doomsday Lite","Ja oder Nein", $input[8])
IniWrite($ini,"Doomsday","Ja oder Nein", $input[9])
IniWrite($ini,"Championsnite","Ja oder Nein", $input[10])
IniWrite($ini,"TT-Accelerate","Ja oder Nein", $input[11])
IniWrite($ini,"TT-Beatdowm","Ja oder Nein", $input[12])
IniWrite($ini,"TT-War Zone","Ja oder Nein", $input[13])
IniWrite($ini,"TT-Free 4 all","Ja oder Nein", $input[14])
IniWrite($ini,"TT-Championsnite","Ja oder Nein", $input[15])
Endfunc
Func EXITT()
MsgBox (0, "Exit", "Bot wird beendet")
Exit
EndFunc
Func Credits()
MsgBox (0, "Credits", "Shadow992 "&@CRLF&"Skollhunter")
EndFunc
Func Start()
TCPStartup()
$ip = TCPNameToIP("www.wrestlegame.de")
TCPShutdown()
$source = TCPRequest($ip, "www.wrestlegame.de", "/login.php", $post)
$cookies = GetCookies($source)
;===========================================================
[I]While 1
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=17", "",$cookies)
$between[1]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[1] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=1", "",$cookies)
$between[2]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[2] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=2", "",$cookies)
$between[3]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[3] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=16", "",$cookies)
$between[4]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[4] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=3", "",$cookies)
$between[5]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[5] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=4", "",$cookies)
$between[6]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[6] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=6", "",$cookies)
$between[7]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[7] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=7", "",$cookies)
$between[8]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[8] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=8", "",$cookies)
$between[9]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[9] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=14", "",$cookies)
$between[10]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[10] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=10", "",$cookies)
$between[11]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[11] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=19", "",$cookies)
$between[12]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[12] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=12", "",$cookies)
$between[13]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[13] ", "",$cookies)
endif
if $input[0]="Ja" then
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php?showid=15", "",$cookies)
$between[14]=_STringBetween($source,'<a href="?action=compete&showid=2&c=','"')
$source = TCPRequest($ip, "www.wrestlegame.de", "www.wrestlegame.de/show.php"&$between[14] ", "",$cookies)
endif
Wend[/I]
;===========================================================
Endfunc
Func GetCookies($sQuellcode)
Local $sCookies, $i, $aCookies
$sCookies = ''
$aCookies = _StringBetween($sQuellcode, 'Set-Cookie: ', ';', 1)
For $i = 0 To UBound($aCookies) - 1
$sCookies &= $aCookies[$i] & ';'
Next
Return $sCookies
EndFunc ;==>GetCookies
Func TCPRequest($sIp, $sHost, $sSeite = "", $sPost = '', $sCookies = '', $sReferer = '', $iMaxTime = 10000)
Local $sPacket, $iSocket, $iTimer
If $sPost = '' Then
$sPacket = 'GET /' & $sSeite & ' HTTP/1.1' & @CRLF
Else
$sPacket = 'POST /' & $sSeite & ' HTTP/1.1' & @CRLF
EndIf
$sPacket &= 'Host: ' & $sHost & @CRLF & _
'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.10) Gecko/20100504 Firefox/3.5.10 (.NET CLR 3.5.30729)' & @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: 300' & @CRLF & _
'Content-Type: application/x-www-form-urlencoded' & @CRLF & _
'Connection: keep-alive' & @CRLF
If $sReferer <> '' Then
$sPacket &= 'Referer: ' & $sReferer & @CRLF
EndIf
If $sCookies <> '' Then
$sPacket &= 'Cookie: ' & $sCookies & @CRLF
EndIf
If $sPost <> '' Then
$sPacket &= 'Content-Length: ' & StringLen($sPost) & @CRLF
EndIf
$sPacket &= @CRLF
If $sPost <> '' Then
$sPacket &= $sPost
EndIf
TCPStartup()
If @error Then Return SetError(1, 0, "")
$iSocket = TCPConnect($sIp, 80)
If @error Then Return SetError(2, 0, "")
TCPSend($iSocket, $sPacket)
If @error Then Return SetError(3, 0, "")
$iTimer = TimerInit()
Do
$sRecv = TCPRecv($iSocket, 1024)
If TimerDiff($iTimer) > $iMaxTime Then Return SetError(4, 0, "")
Until $sRecv <> ""
Do
$sRecv &= TCPRecv($iSocket, 1024)
Until @error Or StringInStr($sRecv, '</html>')
TCPCloseSocket($iSocket)
TCPShutdown()
Return $sRecv
EndFunc ;==>TCPRequest
Func Change($string)
$string = StringReplace($string, "%", "%25")
$string = StringReplace($string, "†", "%E2%80%A0")
$string = StringReplace($string, "ä", "%C3%A4")
$string = StringReplace($string, "ö", "%C3%B6")
$string = StringReplace($string, "ü", "%C3%BC")
$string = StringReplace($string, "!", "%21")
$string = StringReplace($string, '"', "%22")
$string = StringReplace($string, "§", "%C2%A7")
$string = StringReplace($string, "$", "%24")
$string = StringReplace($string, "&", "%26")
$string = StringReplace($string, "/", "%2F")
$string = StringReplace($string, "+", "%2B")
$string = StringReplace($string, " ", "+")
$string = StringReplace($string, "(", "%28")
$string = StringReplace($string, ")", "%29")
$string = StringReplace($string, "=", "%3D")
$string = StringReplace($string, "?", "%3F")
$string = StringReplace($string, "[", "%5B")
$string = StringReplace($string, "]", "%5D")
$string = StringReplace($string, "{", "%7B")
$string = StringReplace($string, "}", "%7D")
$string = StringReplace($string, "ß", "%C3%9F")
$string = StringReplace($string, ",", "%2C")
$string = StringReplace($string, ":", "%3A")
$string = StringReplace($string, ";", "%3B")
$string = StringReplace($string, "#", "%23")
$string = StringReplace($string, "~", "%7E")
$string = StringReplace($string, "²", "%C2%B2")
$string = StringReplace($string, "³", "%C2%B3")
$string = StringReplace($string, "<", "%3C")
$string = StringReplace($string, ">", "%3E")
$string = StringReplace($string, "|", "%7C")
$string = StringReplace($string, "^", "%5E")
$string = StringReplace($string, "°", "%C2%B0")
$string = StringReplace($string, "´", "%C2%B4")
$string = StringReplace($string, "@", "%40")
$string = StringReplace($string, "€", "%E2%82%AC")
Return $string
EndFunc ;==>Change






