Packet Sniffing in C#
Posted on 2005-05-01
Basically I am attempting to create a packet sniffer to capture all packets leaving my machine to port 80 on a remote web server. The program will be used to replay requests made to the remote server, to test if the web sites we have running on the remote server can handle large volumes of traffic (requests). I would prefer to create this package from the ground up so i can learn how it all works. Could you please explain how to create a packet sniffer in C# and how the recorded packets could be replayed to the server, using sockets or some thing?.
a) 10 requests (and HTTP/POST data) are sent from a web browser to a website on a remote server.
b) The 10 requests are recorded (and the data).
c) The 10 requests are replayed with the exact delays recorded during the packet transfur, but multiplied by upto around 10,000 times, over random intervals (would you use threads for this?).
Please explain how to use the classes needed for creating this program ( a full solution is not needed, just an understanding of what classes to use and how to use them).