Extract http objects to files with python
I know it's easy to extract http objects to files. But I have many pcap files so wish to do it with python script. How can I do it with python?
I know it's easy to extract http objects to files. But I have many pcap files so wish to do it with python script. How can I do it with python?
Use tshark, calling it from python and using the --export-objects <protocol>,<destdir>
argument to specify which protocol objects, "http" in your case and the destination directory. The python code will also have to provide the name of the capture file to read as a -r
argument.
See the tshark man page for more info on using it.
For tshark use a command similar to:
tshark -r "NameOfCaptureFile" --export-objects "http,PathToDestinationDirectory"
Your Python code will have to arrange such a command line substituting in the capture file name and the output directory. You'll have to write that Python code yourself.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2019-12-04 14:33:04 +0000
Seen: 1,414 times
Last updated: Dec 05 '19
Determine if python code was sent through port 80
Get IP/host informations of an app.
http request and response clarification!
How to plot HTTP requests/sec graph?
why protocol is not showing as HTTP even though we sent http request ?
How can I get https to show in Wireshark?