random667 Posted June 3, 2005 Posted June 3, 2005 (edited) Lets say i have a chat program connected to yahoo chat, can i use TCPRecv to get the same data the chat program is recieving? i have been trying with this code, but doesnt seem to work. ;CLIENT!!!!!!!! Start SERVER First... dummy!! #include <GUIConstants.au3> ; Start The TCP Services ;============================================== TCPStartUp() ; Connect to a Listening "SOCKET" ;============================================== $socket = TCPConnect( "216.155.193.142", "5050") If $socket = -1 Then Exit ; Create a GUI for chatting ;============================================== $GOOEY = GUICreate("my client - Server Connected",350,200) $edit = GUICtrlCreateEdit("",10,40,330,150,$WS_DISABLED) $input = GUICtrlCreateInput("",10,10,250,20) $butt = GUICtrlCreateButton("Send",260,10,80,20,$BS_DEFPUSHBUTTON) GUISetState() $x = 0 Do $recv = TCPRecv($socket, 512 ) GUICtrlSetData("Edit1", $recv) Until $x=1 Edited June 3, 2005 by random667 It is really sad to see a family torn apart by something as simple as a pack of wolves.
random667 Posted June 4, 2005 Author Posted June 4, 2005 Anyone? I just need a yes or no here. can i use TCPRecv to get the same data the chat program is recieving? It is really sad to see a family torn apart by something as simple as a pack of wolves.
layer Posted June 4, 2005 Posted June 4, 2005 GUICtrlSetData("Edit1", $recv)What's this supposed to do? Is there an "Edit1" available? Or are you trying to set the data of "$edit" FootbaG
random667 Posted June 4, 2005 Author Posted June 4, 2005 Umm,? yea, there is an edit, $edit = GUICtrlCreateEdit("",10,40,330,150,$WS_DISABLED) and i am trying to fill it with the data that is coming into a chat client which is connected to: "216.155.193.142", "5050" maybe i can simplify the code: TCPStartUp() $socket = TCPConnect( "216.155.193.142", "5050") $x = 0 Do $recv = TCPRecv($socket, 512 ) MsgBox(0, "title",$recv) Until $x=1 my question is: can i use these Tcp commands to intercept the data that is comming into another program? It is really sad to see a family torn apart by something as simple as a pack of wolves.
random667 Posted June 5, 2005 Author Posted June 5, 2005 (edited) no one? c'mon this should be a simple yes or no answer! my question is: can i use these Tcp commands to intercept the data that is comming into another program? Edited June 5, 2005 by random667 It is really sad to see a family torn apart by something as simple as a pack of wolves.
/dev/null Posted June 5, 2005 Posted June 5, 2005 (edited) no one?c'mon this should be a simple yes or no answer!my question is: can i use these Tcp commands to intercept the data that is comming into another program?<{POST_SNAPBACK}>Answer: NO.No way, you cannot connect to an already connected socket because the OS (Windoze) relays the data to the process that "owns" the socket (did first connect to it). This can only be one process at a time. What you need is a packet sniffer, but I think this cannot be done with AutoIT. You might be able to use WinPcpa, a packet capture library for Windows. See this link: WinPcap. You would have to DllCall some functions provided by packet.dll. But this is far beyond simple scripting....EDIT: Just found this... This might help using WinPcap with AutoIT and VBScript... http://www.beesync.com/packetx/There is also VBS sample code. BUT, even then, still a long way to go ...CheersKurt Edited June 5, 2005 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
random667 Posted June 5, 2005 Author Posted June 5, 2005 Thank you very much! It is really sad to see a family torn apart by something as simple as a pack of wolves.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now