Viewing HTTP request & response, extracting URLs from PCAP file
This script basically shows HTTP request & response, extracting URLs and filename (if any) from PCAP file into more human-friendly and beautiful format. :p
This is just a layman's coding style. Create this just for fun and for learning purpose.
The result will contains:
- Source IP
- HTTP Method
- Requested URL
- Timestamp
- Dest IP
- User-Agent
- Referer
- HTTP Response
- Filename
- Content_Type
- Download the Python script
- Ensure you have Python3+ installed (currently I'm running Python 3.9.1)
- Ensure you have pip installed
- Ensure you have Wireshark installed
- Install scapy, scapy-http via pip -e.g. pip install scapy scapy-http
- Run the script: python pcap2url.py sample.pcap
- Profit! :)