I gathered the POST packet used for login and tried to use it in AutoIT, but no matter how I implement the stuff I get a response saying: <font color='red'>This username does not exist.</font>
Request URL:
Request Method: POST
Status Code: 200 OK
Remote Address: 82.221.136.4:80
Referrer Policy: no-referrer-when-downgrade
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Content-Encoding: gzip
Content-Length: 67
Content-Type: text/html; charset=UTF-8
Date: Sun, 01 Sep 2019 21:53:19 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: LiteSpeed
Vary: Accept-Encoding
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Connection: keep-alive
Content-Length: 42
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Cookie: PHPSESSID=ii9n855e42nrn8rk89vlof46j5
Host: mylolsim.net
Origin:
Referer:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
X-Requested-With: XMLHttpRequest
username: Name
password: TestPasswort
Request Method: POST
Status Code: 200 OK
Remote Address: 82.221.136.4:80
Referrer Policy: no-referrer-when-downgrade
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Content-Encoding: gzip
Content-Length: 67
Content-Type: text/html; charset=UTF-8
Date: Sun, 01 Sep 2019 21:53:19 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: LiteSpeed
Vary: Accept-Encoding
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Connection: keep-alive
Content-Length: 42
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Cookie: PHPSESSID=ii9n855e42nrn8rk89vlof46j5
Host: mylolsim.net
Origin:
Referer:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
X-Requested-With: XMLHttpRequest
username: Name
password: TestPasswort
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinHttp.au3>
#include <String.au3>
#Region ### START Koda GUI section ### Form=C:\Users\User\Desktop\Neuer Ordner (2)\BetaForm.kxf
$Form1 = GUICreate("Form1", 631, 185, 192, 124)
$Label1 = GUICtrlCreateLabel("Username:", 8, 8, 55, 17)
$Label2 = GUICtrlCreateLabel("Password:", 8, 64, 53, 17)
$Input1 = GUICtrlCreateInput("", 8, 32, 113, 21)
$Input2 = GUICtrlCreateInput("", 8, 88, 113, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$Button1 = GUICtrlCreateButton("Login", 24, 120, 75, 25)
$Edit1 = GUICtrlCreateEdit("", 304, 24, 185, 89)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Login()
EndSwitch
WEnd
Func _Login()
Global $Username = GUICtrlRead($Input1)
Global $Password = GUICtrlRead($Input2)
Local $url = 'http://mylolsim.net/script/login.php'
$login = ObjCreate('winhttp.winhttprequest.5.1')
$login_packet = 'username: '& $Username
$login.open('POST', $url)
$login.SetRequestHeader('Content-Type', 'text/html; charset=UTF-8')
$login.Send($login_packet)
$login.WaitForResponse()
$sourcecode = $login.ResponseText()
GUICtrlSetData($Edit1, ''& $sourcecode)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Login()
EndSwitch
WEnd
EndFunc
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinHttp.au3>
#include <String.au3>
#Region ### START Koda GUI section ### Form=C:\Users\User\Desktop\Neuer Ordner (2)\BetaForm.kxf
$Form1 = GUICreate("Form1", 631, 185, 192, 124)
$Label1 = GUICtrlCreateLabel("Username:", 8, 8, 55, 17)
$Label2 = GUICtrlCreateLabel("Password:", 8, 64, 53, 17)
$Input1 = GUICtrlCreateInput("", 8, 32, 113, 21)
$Input2 = GUICtrlCreateInput("", 8, 88, 113, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$Button1 = GUICtrlCreateButton("Login", 24, 120, 75, 25)
$Edit1 = GUICtrlCreateEdit("", 304, 24, 185, 89)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Login()
EndSwitch
WEnd
Func _Login()
Global $Username = GUICtrlRead($Input1)
Global $Password = GUICtrlRead($Input2)
Local $url = 'http://mylolsim.net/script/login.php'
$login = ObjCreate('winhttp.winhttprequest.5.1')
$login_packet = 'username: '& $Username
$login.open('POST', $url)
$login.SetRequestHeader('Content-Type', 'text/html; charset=UTF-8')
$login.Send($login_packet)
$login.WaitForResponse()
$sourcecode = $login.ResponseText()
GUICtrlSetData($Edit1, ''& $sourcecode)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Login()
EndSwitch
WEnd
EndFunc
I would really appreciate any given help!
Thanks in advance.