views:

91

answers:

3

Is there somewhere I can find examples of properly formed packets for a varaiaty of things, like HTTP, FTP, and other protocols?

Update:

I don't want to just sniff my own packets because I want to be sure that the packets are formed properly, and that the programs associated with them are doing their job correctly.

+1  A: 

You can use wireshark http://www.wireshark.org/ and watch your own packets. This can be really useful for learning protocols, since you can control exactly what example you want to generate.

Chad
I didn't want to do this as I want to be sure that everything is done properly.
Unkwntech
Why don't you use proper clients then? Then compare it to the packets your program has generated. Otherwise, most protocols are pretty well documented across the internet, maybe just google the part you know in quotes. ("GET /" for example)
Chad
this is an awful idea - just because a set of packets might happen to work doesn't mean they're properly formed.
Alnitak
@Alnitak, my point exactly.
Unkwntech
A: 

Almost all of these protocols are very well documented in the RFC series from the IETF, and most RFCs include examples of packets too.

Alnitak
A: 

If you can't use well tested libraries and have to write everything yourself, there is no way around actually stiffing, analyzing and understanding the details of the packets yourself.

Also keep in mind that different implementations may yield different results. That is how fingerprinting is done, by examining how the packet is formed paired up with knowledge on how the different implementations generates them.

As Chad says in a reply here, wireshark is the tool to use, and I want to add that you should analyze packets from more than one system/configuration.

Eigir