Create a gist now

Instantly share code, notes, and snippets.

@juananpe /leer.py Secret
Created Jul 30, 2018

Embed
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 == "10.10.0.70":
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