Skip to content

Instantly share code, notes, and snippets.

@ieaster1
Created March 31, 2022 18:45
Show Gist options
  • Save ieaster1/725e44477a60665f8ff8cdae782b3db9 to your computer and use it in GitHub Desktop.
Save ieaster1/725e44477a60665f8ff8cdae782b3db9 to your computer and use it in GitHub Desktop.
from scapy.all import PcapReader, Raw
pcap = PcapReader("test.pcap")
f = open("test.mpg", "wb")
for packet in pcap:
f.write(bytes(packet.getlayer(Raw)))
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment