Justniffer
Justniffer is a TCP packet sniffer. It can log network traffic in a 'standard' or in a customized way. It can also log response times, useful for tracking network services performances.
The output format of the traffic can be easily customized. An example written in Python stores the transferred contents in an output directory separated by domains. This means that the transferred files like html, css, javascript, images, sounds, etc. can be saved to a directory.
Overview
justniffer was born to help in troubleshooting performance in network TCP-based services: HTTP, RTSP, SIP, SMTP, IMAP, POP, LDAP, Telnet etc.It can collect low and high level protocol and performance information, reconstructing the TCP flow in a reliable way using portions of the Linux kernel code. It uses a slightly modified version of the libraries that already include a modified version of Linux kernel code in a more reusable way.
It can be extended with external scripts and generate logs in a customizable way
The man page for justniffer explains all the options.