|
You last visited: Today at 03:18
Advertisement
Hilfe bei TCP Get und Post Packets
Discussion on Hilfe bei TCP Get und Post Packets within the AutoIt forum part of the Coders Den category.
01/02/2012, 23:39
|
#1
|
elite*gold: 192
Join Date: May 2009
Posts: 2,227
Received Thanks: 3,262
|
Hilfe bei TCP Get und Post Packets
Hallo. Ich hab ein kleines Problem.
Ich hab ein kleines Problem. Ich hab ein Script erstellt, das mich in eine Seite einloggt (POST PACKET) und auf einen Button klickt (POST PACKET). Wenn man auf diesen Button drueckt, erwirbt man etwas und bekommt z.B Items. Nachdem ich den Button gedrueckt habe, bekommt ich noch ein Get Packet. Allerdings weis ich nicht wie ich es in mein Script einbauen kann.
Infos : Es handelt sich um das Spiel 4Story (Privat Server).
Script :
PHP Code:
$PacketLogin = "http://play4s.com/Passport/Login.aspx" & @CRLF & _ "POST /Passport/Login.aspx HTTP/1.1" & @CRLF & _ "Host: play4s.com" & @CRLF & _ "User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1" & @CRLF & _ "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & @CRLF & _ "Accept-Language: pl,en-us;q=0.7,en;q=0.3" & @CRLF & _ "Accept-Encoding: gzip, deflate" & @CRLF & _ "Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7" & @CRLF & _ "Connection: keep-alive" & @CRLF & _ "Referer: http://play4s.com/Passport/Login.aspx" & @CRLF & _ "Cookie: Hier stehen die cookies ^^" @CRLF & _ "Content-Type: application/x-www-form-urlencoded" & @CRLF & _ "Content-Length: 458" & @CRLF & _ "__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUJOTYzOTgxNTM4ZGTayN5eANrV50bR3Z%2B5hVh%2BHlUlxNpiUAT%2BfavvfUt8pg%3D%3D&__EVENTVALIDATION=%2FwEWBQKI8qGZDAKw45OtDwLp6IlpAr3luvABAs%2FuqZ4IP0pIyphlV5YX9UM%2FhYC7kuwjZYAIaC1jMPe5fGRbB94%3D&ctl00%24contentPlaceHolderContent%24tbUserName=HierstetderBenutzername ^^&ctl00%24contentPlaceHolderContent%24tbPassword=HierdasPW^^&ctl00%24contentPlaceHolderContent%24tbCode=86838&ctl00%24contentPlaceHolderContent%24btnSubmit=Login" & @CRLF & _ "HTTP/1.1 302 Found" & @CRLF & _ "Cache-Control: private" & @CRLF & _ "Content-Type: text/html; charset=utf-8" & @CRLF & _ "Location: /" & @CRLF & _ "Server: Microsoft-IIS/7.0" & @CRLF & _ "X-AspNet-Version: 4.0.30319" & @CRLF & _ "Set-Cookie: NexonPassport=FEACEF6DC9F59905E1A3F2EB230E4A43AE6802B9138126810FE3AAADD0EDA5CDEF253C7D72B6CA7E02DA88AC7610F8FE64EFAD0BA1D0F0DE56F33A58C5132C07AA30C07D51D097BD46CBD188A40D8655D7AA0DECA93CD2C1C3664524D7610DE2ED5DB0F45064B5A3F12CB8B33D65C7A12796FB8B56A4F115E7DC170AB7C1B68C6F3B351BAA2231AA96296204C241AD10178C3208B17C6DF304C73DB9918907C2; domain=play4s.com; expires=Mon, 02-Jan-2012 20:22:59 GMT; path=/; HttpOnly" & @CRLF & _ "X-Powered-By: ASP.NET" & @CRLF & _ "Date: Mon, 02 Jan 2012 19:52:58 GMT" & @CRLF & _ "Content-Length: 118" & @CRLF & @CRLF
$PacketSend = "http://play4s.com/Cash/BuyItem.ashx" & @CRLF & _ "POST /Cash/BuyItem.ashx HTTP/1.1"& @CRLF & _ "Host: play4s.com"& @CRLF & _ "User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"& @CRLF & _ "Accept: application/json, text/javascript, */*; q=0.01"& @CRLF & _ "Accept-Language: pl,en-us;q=0.7,en;q=0.3"& @CRLF & _ "Accept-Encoding: gzip, deflate"& @CRLF & _ "Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7"& @CRLF & _ "Connection: keep-alive"& @CRLF & _ "Content-Type: application/x-www-form-urlencoded; charset=UTF-8"& @CRLF & _ "X-Requested-With: XMLHttpRequest"& @CRLF & _ "Referer: http://play4s.com/Cash/Items.aspx?CateID=1"& @CRLF & _ "Content-Length: 5"& @CRLF & _ "Cookie: hier stehen wieder die cookies ^^"& @CRLF & _ "Pragma: no-cache"& @CRLF & _ "Cache-Control: no-cache"& @CRLF & _ "id=68"& @CRLF & _ "HTTP/1.1 200 OK"& @CRLF & _ "Cache-Control: private"& @CRLF & _ "Content-Type: text/plain; charset=utf-8"& @CRLF & _ "Server: Microsoft-IIS/7.0"& @CRLF & _ "X-AspNet-Version: 4.0.30319"& @CRLF & _ "X-Powered-By: ASP.NET"& @CRLF & _ "Date: Mon, 02 Jan 2012 20:00:12 GMT"& @CRLF & _ "Content-Length: 90"& @CRLF & @CRLF
TCPStartup () $socket = TCPConnect ("50.7.234.218",80) $send = TCPSend ($socket, $PacketLogin) If @error Then MsgBox (0,"Error","Send") EndIf $SendIS = TCPSend ($socket, $PacketSend) If @error Then MsgBox (0,"Error","SendIS") EndIf MsgBox (0,"Erfolgreich","1") TCPShutdown ()
Wie kann ich jezz ein Get Packet mit einbauen?
|
|
|
01/02/2012, 23:55
|
#2
|
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
|
Quote:
Code:
_
"Cookie: Hier stehen die cookies ^^" @CRLF & _
|
ich bezweifle das es sich hierbei um korrekte cookies handelt.
zu deiner eigentlichen frage:
TCPSend(...) Sendet Packet
TCPRecv(...) Empfängt Packet
das ganze wäre am besten über zustände steuerbar.
so sollte es problemlos möglich sein gleichzeitig senden und empfangen zu können =)
|
|
|
01/03/2012, 00:08
|
#3
|
elite*gold: 192
Join Date: May 2009
Posts: 2,227
Received Thanks: 3,262
|
Quote:
Originally Posted by lolkop
ich bezweifle das es sich hierbei um korrekte cookies handelt.
zu deiner eigentlichen frage:
TCPSend(...) Sendet Packet
TCPRecv(...) Empfängt Packet
das ganze wäre am besten über zustände steuerbar.
so sollte es problemlos möglich sein gleichzeitig senden und empfangen zu können =)
|
Danke dir fuer die schnelle antowort, aber was meinst du mit "keine korrekte cookies" ? Ich hab die cookies entfernt. Hab gehoert, durch cookies kann man sich in Foren einloggen ^^
|
|
|
01/03/2012, 00:13
|
#4
|
elite*gold: 42
Join Date: Jun 2008
Posts: 5,426
Received Thanks: 1,888
|
Quote:
Originally Posted by Logtetsch
Danke dir fuer die schnelle antowort, aber was meinst du mit "keine korrekte cookies" ? Ich hab die cookies entfernt. Hab gehoert, durch cookies kann man sich in Foren einloggen ^^
|
HTTP-Cookie
|
|
|
01/06/2012, 21:53
|
#5
|
elite*gold: 0
Join Date: May 2008
Posts: 509
Received Thanks: 1,246
|
First of all TCPSend() only sends raw data. Your trying to send a HTTP header. You will need a HTTP UDF and use the functions in it in order to make your script work.
PHP Code:
#include "WinHttp.au3"
Opt("MustDeclareVars", 1)
; Open needed handles Global $hOpen = _WinHttpOpen() Global $hConnect = _WinHttpConnect($hOpen, "msdn.microsoft.com") ; Specify the reguest: Global $hRequest = _WinHttpOpenRequest($hConnect, Default, "en-us/library/aa384101(VS.85).aspx")
; Send request _WinHttpSendRequest($hRequest)
; Wait for the response _WinHttpReceiveResponse($hRequest)
Global $sHeader = _WinHttpQueryHeaders($hRequest) ; ...get full header
; Clean _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen)
; Display retrieved header MsgBox(0, "Header", $sHeader)
UDF Download:
|
|
|
01/07/2012, 02:34
|
#6
|
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
|
Quote:
Originally Posted by =Warmonger=
First of all TCPSend() only sends raw data. Your trying to send a HTTP header.
|
first of all, he's trying to send a string. if you check the helpfile, you'll see, that TCPSend is infact able to handle and send strings used in the data parameter:
Quote:
Originally Posted by Autoit HelpFile
TCPSend ( mainsocket, data )
parameter | content |
---|
mainsocket | The connected socket identifier (SocketID) as returned by a TCPConnect function. | data | binary/string to be send to the connected socket. |
|
|
|
|
|
Similar Threads
|
[Packets] Wie änder ich flyff packets?
07/16/2011 - Flyff Private Server - 19 Replies
HeyHo,
Ich würde sehr gerne wissen wie man die Flyff Packets ändert...
ich denke mal Zahlen ändern werden nicht ausreichen oder?
|
[Hilfe] Packets Mob Walk
06/03/2009 - Kal Online - 32 Replies
Hello all,
after arround 4-5 Hours of hard learning, my bot works very simple.
Now i try to fix, that my Bot beheads all died mobs arround me...
There should be something like a range arround 50.
For Pick, it works. difference between x,y and some math ^^.
After a Mobs spawn / apear, i get x,y coords. But they walk arround. And thats the Problem. I recive 1 Packet (for exampe: Mob move: x=2 y=4) 3-4 times. How can i fix that problem?
My Try:
if(lastMoveId!=id || lastMoveX != x ||...
|
packets fürs mixen hilfe pls
10/12/2008 - Kal Online - 3 Replies
hi
ich brauch hilfe bei den packets:
BYTE MIX = {0x62, G40weap, Armor, Weapon, medicine, money};
woher bekomme ich die IDs fürs g40 weapon und den rest?
danke für alle hilfreichen antworten, alle die nich helfen wollen und nur ihren senf dazu geben möchten, lasst es einfach sein, danke
|
All times are GMT +2. The time now is 03:18.
|
|