The website is Voobly, for testing you will need an account, simply fill forms here then create one (Email verification is not required, you can even use non-created emails), you can use the script directly still.
After some searching I understood from this post that I should find a header named Set-Cookie, the thing here is that that header is not showing up at all, from what I noticed it is Forbidden Header, but if I use Content-Type with value of application/json, it appears, however that makes the logging un-successful.
My script so far:
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance Force
PostData := "username=" Username "&password=" Password "&login=submit"
Voobly := ComObject('WinHttp.WinHttpRequest.5.1')
Voobly.Open('GET', Website := 'https://www.voobly.com')
Voobly.Send()
Voobly.Open('POST', Website '/login/auth', False)
Voobly.SetRequestHeader('User-Agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0')
Voobly.SetRequestHeader('Referer', Website)
Voobly.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Voobly.Send(PostData)
Msgbox Voobly.GetAllResponseHeaders
If !InStr(Voobly.ResponseText, 'Welcome to Voobly!') {
MsgBox('Could not log in correctly!', 'Log error', 16 ' T5')
ExitApp
}
MsgBox('Welcome to Voobly!', 'Log success', 64)