Hi, I'm trying to logging in to secure site:
Func GetTraf2()
DllOpen("wininet.dll")
$data = "user%5Blogin%5D=some_username&user%5Bpassword%5D=some_password"
$type = "Content-Type: application/x-www-form-urlencoded" & @CRLF
$agent = "User-Agent: Mozilla/5.0" & @CRLF
$newdata = $agent & $type
$internet = _WinINet_InternetOpen("Mozilla")
If $internet == 0 Then
MsgBox(0, "Error in Mozilla", "Setup Error")
Exit
EndIf
$internetconnect = _WinINet_InternetConnect($internet, $INTERNET_SERVICE_HTTP, "https://some_site.ru")
If @error Then
MsgBox(0, "Error in internetconnect", @error)
Exit
EndIf
$HTTPRequest = _WinINet_HttpOpenRequest($internetconnect, "POST", "/login", $INTERNET_FLAG_KEEP_CONNECTION, "HTTP/1.1", "https://some_site.ru/login")
$addheader = _WinINet_HttpAddRequestHeaders($HTTPRequest, $newdata, $HTTP_ADDREQ_FLAG_ADD)
ConsoleWrite($addheader & @CRLF)
$sendrequest = _WinINet_HttpSendRequest($HTTPRequest, Default, StringToBinary($data))
Local $readfile = Binary("")
Do
$readfile &= _WinINet_InternetReadFile($HTTPRequest, 5000)
Until @error<>0 Or Not @extended
MsgBox(2, "Content", BinaryToString($readfile))
EndFunc ;==>GetTraf2
But after execution this function I only see empty Content msg box . Wireshark shows nothing activity.