![]() |
| | #1 |
| Registered User Join Date: Oct 2005
Posts: 14
| Packet Interception(?) There is a client and a server (on a TCP internet connection of coarse). The client is constantly recieving packets from the server. Packets are systematically sent back to the server with keyboard and mouse input into the client. What i would like to setup is automated packet responses, eliminating user input. To do this though..? I have a few ideas on how it might be done but I do not know the right solution. Assuming I don't have the code for the client, how could this be achieved? Thanks guys. |
| muehl is offline | |
| | #2 |
| Registered User Join Date: Mar 2005 Location: Mountaintop, Pa
Posts: 1,059
| Maybe I'm missing something here. But can't you just set up an infinite loop on the client to automatically respond to the server? I have done this many times to "stress test" C/S apps. Are you trying to emulate keyboard and mouse movement as input to be sent to the server? Bob |
| BobS0327 is offline | |
| | #4 |
| Unregistered User Join Date: Sep 2005 Location: Antarctica
Posts: 341
| two different ways Ive done packet filtering in the past, the harder way (but better way) is to write an NDIS filter driver. Don't count on getting much good info on doing this here, or anywhere for that matter. The easier way is to write an LSP (Layered Service Provider), you can use that to filter all winsock calls. It's still a pretty complicated process, but it's all done in user mode. You can only filter things that go through winsock so this will limit you to TCP/IP, it won't filter things like IPX/SPX, but who the hell uses that anymore anyway??? |
| rockytriton is offline | |
| | #5 |
| Registered User Join Date: Sep 2004
Posts: 12
| Since your subject says packet interception, I'm assuming you want a 3rd host to get the packets and reply. You can use the pcap library to capture the packets in promiscuous mode. The library supports filtering too so you can get just the packets you need. Once you've got a request, you can create a RAW socket, create your own IP header to use the IP of the actual client, build the TCP header, attach the payload and send the 'automated' keyboard and mouse values. |
| tin is offline | |
| | #6 |
| Registered User Join Date: Oct 2005
Posts: 14
| cool.. this is good stuff. i'll need to do some background work but i've got my head around it thanks! one more question though. say you build or modify outgoing packets.. this is good but at the same time i want the client to react. like moving the coordinace of a sprite in an online game. i want the client and server both react to the automation. do you know what i mean? |
| muehl is offline | |
| | #7 |
| Registered User Join Date: Sep 2004
Posts: 197
| yea, sounds like your trying to cheat to me, but then again, thats me.
__________________ If any part of my post is incorrect, please correct me. This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted. |
| Xipher is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Packet processing in Socket programming, please help | pumpkin | Networking/Device Communication | 5 | 05-28-2009 01:33 AM |
| segmentation fault while writing a packet to a pacp file | Neminath | C Programming | 4 | 05-05-2009 05:35 AM |
| How to make a Packet sniffer/filter? | shown | C++ Programming | 2 | 02-22-2009 09:51 PM |
| Global Variables | Taka | C Programming | 34 | 11-02-2007 03:25 AM |
| Raw Packet (sorry tripple weird Post) | Coder87C | Networking/Device Communication | 6 | 03-04-2006 11:34 AM |