• Welcome to Valhalla Legends Archive.
 

[c#] tcp/ip packet sniffing

Started by Laff, September 27, 2004, 02:00 PM

Previous topic - Next topic

Laff

for now i've given up on making a full-on wc3 bot in c# because, well, school just started and i don't have time.  so i want to do something that MIGHT be simpler.

i just want to sniff tcp packets coming in on the port (6112) and dump them into some data structure i'll create.  my only experience with doing this sort of thing was last year in my networking class using a c library known as winpcap.  i don't know if winpcap exists in c# but i also would like to steer clear of using it.

anyone wanna point me in the right direction and give me some classes to research and be on my way?

drivehappy


MyndFyre

Generally speaking you will not be able to "sniff" packets in the manner that you suggest without using a kernel-mode driver such as Winpcap.  You most likely will not be able to write a kernel-mode driver in C#.  I suppose you could, using a mix of real and managed C++.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.