Jump to content
  • Advertisement
Sign in to follow this  
BigBeginner

IP packet logging at a port

This topic is 4322 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I want to make a program that logs the incoming datas through a port with Delphi. Its a kind of sniffing program. Has anybody got an idea how to do it? I accept WinSock ideas, Delphi component ideas or even DirectPlay8 sollutions :) As I said I except the Delphi sollution, but if someone has C++/VisualBASIC etc idea, write down pls :)

Share this post


Link to post
Share on other sites
Advertisement
At the time being, I don't have any specific code, but I can give you some general advice. Assuming you know the port number you want to get packets 'from', as well as the server address the packets are being sent to or from, I reccomend you simply make a proxy program that relays data between client and server. Schematically, it would look something like this:

- Client starts.
- Client connects to your proxy program (this is tricky, it might require you to dissassemble the client exe file in the worst case scenario).
- Client starts to send data to the server, which is picked up by your program, saved to disk, and then sent to the server.
- Server responds with some data that is sent to your program, which is, again, saved to disk by your program, and then relayed to the client.

etc.

Hope that wasn't too hard to understand! Good luck! :)

Share this post


Link to post
Share on other sites
I would first try to use WireShark to do the capture for me.
If that's not good, then I'd use the WinPcap library to help me capture packets.
Only if that didn't work would I go looking for SOCK_RAW type socket information on MSDN.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!