Ich bauen grad einen TCP recv Script, um von einem Process die Packete zu empfangen. Habe hier ein bespiel server&client gebaut um packete zu simulieren. Diese Packete möchte ich nun per script empfangen. Nun bin ich grad am hängen. Hab da wenig erfahrung mit DLLCall und weiß nicht zu 100% ob das überhaupt möglich ist.
#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
;==============================================
;==============================================
;SERVER!! Start Me First !!!!!!!!!!!!!!!
;==============================================
;==============================================
Example()
Func Example()
; Set Some reusable info
; Set your Public IP address (@IPAddress1) here.
; Local $szServerPC = @ComputerName
; Local $szIPADDRESS = TCPNameToIP($szServerPC)
Local $szIPADDRESS = @IPAddress1
Local $nPORT = 33891
Local $MainSocket, $GOOEY, $edit, $ConnectedSocket, $szIP_Accepted
Local $msg, $recv
; Start The TCP Services
;==============================================
TCPStartup()
; Create a Listening "SOCKET".
; Using your IP Address and Port 33891.
;==============================================
$MainSocket = TCPListen($szIPADDRESS, $nPORT)
; If the Socket creation fails, exit.
If $MainSocket = -1 Then Exit
; Create a GUI for messages
;==============================================
$GOOEY = GUICreate("My Server (IP: " & $szIPADDRESS & ")", 300, 200)
$edit = GUICtrlCreateEdit("", 10, 10, 280, 180)
GUISetState()
; Initialize a variable to represent a connection
;==============================================
$ConnectedSocket = -1
;Wait for and Accept a connection
;==============================================
Do
$ConnectedSocket = TCPAccept($MainSocket)
Until $ConnectedSocket <> -1
; Get IP of client connecting
$szIP_Accepted = SocketToIP($ConnectedSocket)
; GUI Message Loop
;==============================================
While 1
$msg = GUIGetMsg()
; GUI Closed
;--------------------
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
; Try to receive (up to) 2048 bytes
;----------------------------------------------------------------
$recv = TCPRecv($ConnectedSocket, 2048)
; If the receive failed with @error then the socket has disconnected
;----------------------------------------------------------------
If @error Then ExitLoop
; Update the edit control with what we have received
;----------------------------------------------------------------
If $recv <> "" Then GUICtrlSetData($edit, _
$szIP_Accepted & " > " & $recv & @CRLF & GUICtrlRead($edit))
WEnd
If $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)
TCPShutdown()
EndFunc ;==>Example
; Function to return IP Address from a connected socket.
;----------------------------------------------------------------------
Func SocketToIP($SHOCKET)
Local $sockaddr, $aRet
$sockaddr = DllStructCreate("short;ushort;uint;char[8]")
$aRet = DllCall("Ws2_32.dll", "int", "getpeername", "int", $SHOCKET, _
"ptr", DllStructGetPtr($sockaddr), "int*", DllStructGetSize($sockaddr))
If Not @error And $aRet[0] = 0 Then
$aRet = DllCall("Ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($sockaddr, 3))
If Not @error Then $aRet = $aRet[0]
Else
$aRet = 0
EndIf
$sockaddr = 0
Return $aRet
EndFunc ;==>SocketToIP
Der Client sendet automatisch jede Sekunde ein Packet
Opt('MustDeclareVars', 1)
;==============================================
;==============================================
;CLIENT! Start Me after starting the SERVER!!!!!!!!!!!!!!!
;==============================================
;==============================================
Example()
Func Example()
; Set Some reusable info
;--------------------------
Local $ConnectedSocket, $szData
; Set $szIPADDRESS to wherever the SERVER is. We will change a PC name into an IP Address
; Local $szServerPC = @ComputerName
; Local $szIPADDRESS = TCPNameToIP($szServerPC)
Local $szIPADDRESS = @IPAddress1
Local $nPORT = 33891
; Start The TCP Services
;==============================================
TCPStartup()
; Initialize a variable to represent a connection
;==============================================
$ConnectedSocket = -1
;Attempt to connect to SERVER at its IP and PORT 33891
;=======================================================
$ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT)
; If there is an error... show it
If @error Then
MsgBox(4112, "Error", "TCPConnect failed with WSA error: " & @error)
; If there is no error loop an inputbox for data
; to send to the SERVER.
Else
;Loop forever asking for data to send to the SERVER
While 1
; InputBox for data to transmit
$szData = Random(1,1000,1)
; If they cancel the InputBox or leave it blank we exit our forever loop
If @error Or $szData = "" Then ExitLoop
; We should have data in $szData... lets attempt to send it through our connected socket.
TCPSend($ConnectedSocket, $szData)
Sleep(1000)
; If the send failed with @error then the socket has disconnected
;----------------------------------------------------------------
If @error Then ExitLoop
WEnd
EndIf
EndFunc ;==>Example
Der Hauptcode um das ganze zu empfangen:
Dies habe ich ein wenig umgeschrieben, von
Ich hoffe es macht keinem was aus, (natürlich danke dafür)
Mit Process Explorer /Process Hacker Hs umgehen 05/22/2010 - General Gaming Discussion - 1 Replies Ich habe hier im Forum gelesen, das man mit Process Explorer bzw. Process Hacker das HS umgehen kann. Leider ist mir irgendwie schleierhaft wie das gehen soll. Vllt erbarmt sich jemand und erklärt es (:, da man den sogenannten Bypasser nur noch las Premium Dings Da bei Upload.to runterladen kann :rolleyes:
[help] recv 08/02/2009 - Kal Online - 3 Replies Soo,
man man behinderter tag.
naja wayne.
bin grad dabei mich etwas mehr mit den recv packets außeinander zu setzen.
unter anderem mit den zahlen dahinter.
Borsti sagte das ist die größe (size)
naja also ich hab mir das mal als hex ausgeben lassen (das packet für empfangene nachrichten im chat )
ich hab mir das folgendermaßen "notiziert"
0c 00 3c //size
44 65 6e 4a 61 73//name
[Question] Hooking send() & recv() works, but recv hiding data for co??? 05/06/2009 - CO2 Programming - 2 Replies Hey guys, I've been making a DLL to allow another program to intercept the packets of conquer using windows pipes. (Then its the job of the main program to decrypt the packets, the DLL only gives a communication channel for the main program)
(winsock functions btw)
- hooking send() works fine for my internet browser
- hooking recv() works fine for my internet browser
- hooking send() works fine for conquer online
C# how to pause a process/freeze process 12/08/2008 - CO2 Programming - 2 Replies ya so i was semi bored and after little bit of looking around i didnt find to many examples of how to do this so attached is a demo project to show you how.
basically it comes down to calling ResumeThread() and SuspendThread() (API functions) on all the threads of a process...simple enough
http://img388.imageshack.us/img388/9762/exampleil 6.png
please note when you enter the process name there's no ".exe" to the end
Warning: this isn't idiot proof
.
.
winsock in vb.net? 12/29/2007 - Conquer Online 2 - 4 Replies anyone know how to get winsock into vb.net?ive been googleing for an answer and cant findone.
i downloaded oswinsock and still not sure how to use it??
Ive been using vb6 for a while and am using vb 2005 for the first time and this is pissing me off.i read i should use systemcom.net or somthing?
just anyone know how i can use winsock in vb.net
or explain what i need to do,before i give up on this .net framework and stick with my trusty vb6
if anyone has a simple source proxy in...