Skip to content

Instantly share code, notes, and snippets.


juananpe/ Secret

Created Jul 30, 2018
What would you like to do?
Obtener el payload de ciertos paquetes de un pcap
from __future__ import print_function
from scapy.all import *
# rdpcap comes from scapy and loads in our pcap file
packets = rdpcap('capture.pcap')
newFile = open("payload.bin", "wb")
# Let's iterate through every packet
for packet in packets:
if packet[IP].src == "":
if len(packet) == 566:
print( packet[TCP].payload , end ="")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment