This project is read-only.

Generate packet like HTTP Request

Sep 18, 2010 at 2:37 PM


Is it possible to generate packet to pretend it was a HTTP Request ?

Thank you.

Sep 18, 2010 at 2:45 PM
Edited Sep 18, 2010 at 3:03 PM


HTTP request packets are usually TCP packets with destination port 80 and HTTP request in the TCP payload.

So you can generate an HTTP packet by generating such TCP packet.

Remember that in order for a server to listen to such request you must first open a TCP connection with that server.


The next version of Pcap.Net will support HTTP by providing parsing and building HTTP packets over TCP.

Since this is already implemented and now in the final testing phase, you are welcome to download the latest sources from the Source Code tab and build a Pcap.Net version that support HTTP.



Sep 19, 2010 at 6:24 AM

Thanks again Boaz.

I'll do this.

Would you have a simple example like ping command here with port 80 and TCP payload ?

Sep 20, 2010 at 8:19 PM

I'm downloading Visual Studio 2010 to work with lastest Pcap.Net version.

Pending, I found this :

Packet packet =
						new EthernetLayer
							Source = new MacAddress("1:1:1:1:1:1"),
							Destination = new MacAddress("2:2:2:2:2:2"),
						new IpV4Layer
							Source = new IpV4Address(""),
							Destination = new IpV4Address(""),
							Ttl = 64,
							Identification = 100,
						new TcpLayer
							DestinationPort = 80;



also :




Is it possible to fill payload with http request like this, or just on Pcap.Net 0.7.0 version ?

Sep 21, 2010 at 2:53 PM

It is possible. You should just give another PayloadLayer after the TcpLayer.

In the next version you'll be able to give HttpLayer.

Jan 5, 2011 at 9:42 PM

HttpLayer are now available - Pcap.Net version 0.8.0.