Hallo,
ich möchte über TCP eine Seite besuchen, nur leider komme ich nichtmal soweit das ich was zurück bekommen.
Was mache ich Falsch ?
Spoiler anzeigen
TCPStartup()
$iIP = TCPNameToIP("https://customer.cc.at.paysafecard.com")
Global $iSocket = TCPConnect($iIP, 80)
If $iSocket = -1 Then Exit
MsgBox (0,"",_psc_besuchen())
[/autoit] [autoit][/autoit] [autoit]Func _psc_besuchen()
$sHeader = "GET /psccustomer/GetWelcomePanelServlet HTTP/1.1" & @CRLF & _
"Host: customer.cc.at.paysafecard.com" & @CRLF & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .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-Encoding: gzip,deflate" & @CRLF & _
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & @CRLF & _
"Keep-Alive: 115" & @CRLF & _
"Connection: keep-alive"
$iSend = TCPSend($iSocket, $sHeader)
MsgBox (0,"",$iSend)
While 1
$sRecv = TCPRecv($iSocket, 2048)
If $sRecv <> '' Then
While 1
$sRecv &= TCPRecv($iSocket, 2048)
If @error Or StringInStr($sRecv, "/seam/resource/captcha") Then ExitLoop 2
WEnd
EndIf
WEnd
Return $sRecv
EndFunc
Func _psc_test($code1, $code2, $code3, $code4, $pw, $captcha)
$sPost = "j_id17=j_id17&j_id17%3Arn1=" & $code1 & "&j_id17%3Arn2=" & $code2 & "&j_id17%3Arn3=" & $code3 & "&j_id17%3Arn4=" & $code4 & "&j_id17%3Aj_id23=" & $pw & "&j_id17%3AverifyCaptcha=" & $captcha & "&j_id17%3Anext=Next&javax.faces.ViewState=j_id1"
$sHeader = "POST /psccustomer/GetWelcomePanelServlet HTTP/1.1" & @CRLF & _
"Host: customer.cc.at.paysafecard.com" & @CRLF & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .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: 115" & @CRLF & _
"Connection: keep-alive" & @CRLF & _
"Content-Type: text/html; charset=utf-8" & @CRLF & _
"Content-Length: " & StringLen($sPost) & @CRLF & @CRLF & $sPost
;"Referer: https://customer.cc.at.paysafecard.com/psccustomer/we…eam?cvid=486817" & @CRLF & _
$iSend = TCPSend($iSocket, $sHeader)
While 1
$sRecv = TCPRecv($iSocket, 1024)
If $sRecv <> '' Then
While 1
$sRecv &= TCPRecv($iSocket, 1024)
If @error Or StringInStr($sRecv, "Content-Type: text/html; charset=utf-8") Then ExitLoop 2
WEnd
EndIf
WEnd
Return $sRecv
EndFunc ;==>_psc_test