So, some people seems to be looking for a logger for the mmorpg servers out there ect, so i desided to make a small and fast one for you.
First, here is the download link
----
http://www.freeplay.dk/plogger.rar
you are welcome to use this in any way you wish, written in VS2008 and contains everything you need to get startet.
i also included my own text logging class that is awesome (if you ask my anyways) :)
----
Okay, this should be fairly simple for you to understand.
There is 2 places you need to chance some code for "your game" to work with this logger.
Form1.cs :
the line saying -> public string filter = "tcp port 80";
you ofcourse need to change this to the filter that applies to you, see a list of filters here :
http://www.winpcap.org/docs/docs_40_..._language.html
second place of interrest is the code in the #region Packer Handler section of the code
Thats where all the packet data is handled, eg decoding, logging, and whatever else you wish to do with the data you get in.Code:private void device_PcapOnPacketArrival(object sender, Packet packet) { ... }
-------
Note, the code default logs TCP packets on port 80 (for you to play with).
The "demo" logger works like this:
Start it
Select the interface you wish to log on (netcard) from the list in box 1.
Press ok to start logging, and open a couple of websites.
Click stop, and check the "Logs" folder.
You are ofcourse welcome to use this on your own interface ect, this is just a quick way to get startet.
User input is welcome, questions aswell.
PS : I know it isnt perfect written, but it works, i use this kinda code for all my loggers.


Reply With Quote![[tut+src C#] Packet Logger](http://ragezone.com/hyper728.png)

