?
Solved

Packet Sniffing in C#

Posted on 2005-05-01
5
Medium Priority
?
6,728 Views
Last Modified: 2011-09-20
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?.

E.g.

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).

0
Comment
Question by:rmpalmer
2 Comments
 
LVL 9

Accepted Solution

by:
cyberdevil67 earned 1000 total points
ID: 13907096
Hi rmpalmer,

 This link may help you, this site has a couple of other examples as well.

http://www.codeproject.com/csharp/networkmonitor.asp

Cheers!
0
 
LVL 2

Assisted Solution

by:Mudie
Mudie earned 1000 total points
ID: 13910792
This should be exactly what you need: http://www.codeproject.com/useritems/HSSniffer.asp
"Project is an implementation of a Packet Sniffer that captures packet in a LAN environment using Microsoft .Net environment and written in C#.

 

Our goal was to build a network utility tool that can be an assistant to programmers, network managers, and private users. Our Sniffer can be useful for monitor traffic, debugging, fault analysis, network protocol analysis, network intrusion detection, traffic measuring etc." - (taken from above link)

Also includes the full source.

Hope it helps!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question