PHP Code:
#include <String.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Peter Lampke\Desktop\Wrestlegamebots\Wrestlegame Bot\Neuer Ordner\Form2.kxf
$name=""
$pw=""
$name1=""
$pw1=""
$EncryptPW = "0175874" ;Hier bitte das PW anpassen, kannst nehmen was du willst. Wird aber für die Verschlüsselung gebraucht
$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
Global $aCheckboxes[13][2]
Global $aCheckPos[3][13]= [[32,32,32,32,32,32,32,32,200,200,200,200,200],[72,96,48,120,144,168,192,216,48,72,96,120,144], _
["Accelerate","Night of Glory","Initiative","Beatdown","War Zone","Wildcard Roulette","Doomsday Lite", _
"Doomsday","Championsnite","TT-Accelerate","TT-Beatdown","TT-War Zone","TT-Championsnite"]]
$ini = "config.ini"
$Form2 = GUICreate("Wrestlegame-Bot version 1.0.1", 489, 319, 304, 181)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Main")
$Label1 = GUICtrlCreateLabel("Skollhunter`s Wrestlegame Bot 1.0.1", 104, 40, 179, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Label11 = GUICtrlCreateLabel("© Skollhunter", 32, 232, 68, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Pic1 = GUICtrlCreatePic("C:\Users\Peter Lampke\Desktop\wrestlegame ava\656.jpg", 40, 104, 316, 68, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$TabSheet2 = GUICtrlCreateTabItem("Wähle deine Show")
For $i = 0 To UBound($aCheckPos,2)-1
$aCheckboxes[$i][0] = GUICtrlCreateCheckbox($aCheckPos[2][$i], $aCheckPos[0][$i], $aCheckPos[1][$i], 97, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
Next
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Button7 = GUICtrlCreateButton("Shows speichern", 200, 176, 139, 25, $WS_GROUP)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Label12 = GUICtrlCreateLabel("© Skollhunter", 32, 240, 68, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$TabSheet3 = GUICtrlCreateTabItem("Credits")
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Label2 = GUICtrlCreateLabel("Skollhunter", 48, 56, 57, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Label3 = GUICtrlCreateLabel("Shadow992", 48, 88, 63, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Label13 = GUICtrlCreateLabel("© Skollhunter", 32, 232, 68, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$TabSheet4 = GUICtrlCreateTabItem("Hilfe")
$Label4 = GUICtrlCreateLabel("1.Shows auswählen", 48, 56, 99, 17)
$Label5 = GUICtrlCreateLabel("2.Shows speichern", 48, 80, 94, 17)
$Label6 = GUICtrlCreateLabel("3.Bot starten", 48, 104, 64, 17)
$Label7 = GUICtrlCreateLabel("4.Spaß haben", 48, 128, 71, 17)
$Label8 = GUICtrlCreateLabel("Wer Fragen hat soll Fragen:", 48, 152, 135, 17)
$Label9 = GUICtrlCreateLabel("Elitepvpers-Marox59", 208, 152, 100, 17)
$Label10 = GUICtrlCreateLabel("*************-Skollhunter", 208, 176, 119, 17)
$Label14 = GUICtrlCreateLabel("© Skollhunter", 32, 232, 69, 17)
GUICtrlCreateTabItem("")
$Button1 = GUICtrlCreateButton("&Start", 222, 224, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("&Exit", 310, 224, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Set_Config()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button7
$sSavestring = ""
For $i = 0 To UBound($aCheckboxes)-1
If GUICtrlRead($aCheckboxes[$i][0]) = $GUI_CHECKED Then
$sSavestring &= "1:"
Else
$sSavestring &= "0:"
EndIf
Next
IniWrite(@ScriptDir & "\" & $ini,"Show","Ckeboxstates",StringTrimRight($sSavestring,1))
MsgBox(0,"Fertig","Einstellungen wurden gepeichert")
;====================
;Hier ein Neies Case
;====================
Case $Button2 ;In der Variable steht, wie bei allen Guictrls die ID.
;Wenn nun $nMsg die ID des Buttons zurückgibt, heit das der Button wurde geklickt.
Exit
Case $Button1
Func _Start()
TCPStartup()
$ip = TCPNameToIP("www.wrestlegame.de")
TCPShutdown()
$source = TCPRequest($ip, "www.wrestlegame.de", "/login.php", $post)
$cookies = GetCookies($source)
;===========================================================
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
;===========================================================
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
EndSwitch
WEnd
Func Set_Config()
If IniRead(@ScriptDir & "\" & $ini,"Show","Ckeboxstates","") <> "" Then
$aConf_Checkboxstates = StringSplit(IniRead(@ScriptDir & "\" & $ini,"Show","Ckeboxstates",""),":",2)
For $i = 0 To UBound($aConf_Checkboxstates)-1
If $aConf_Checkboxstates[$i] = "1" Then
GUICtrlSetState($aCheckboxes[$i][0],$GUI_CHECKED)
$aCheckboxes[$i][1] = 1
Else
$aCheckboxes[$i][1] = 0
EndIf
Next
EndIf
EndFunc