Last active
November 7, 2025 04:21
-
-
Save xen0bit/9546646a57cce6fe844d9af2ff35dd10 to your computer and use it in GitHub Desktop.
PCAP merger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import glob | |
| from scapy.all import rdpcap, wrpcap | |
| all_packets = [] | |
| for file in sorted(glob.glob("*.pcap")): | |
| try: | |
| packets = rdpcap(file) | |
| all_packets.extend(packets) | |
| print(f"{file}: Completed.") | |
| except Exception as e: | |
| print(f"{file}: {e}") | |
| wrpcap("merged.pcap", all_packets) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment