Obtener el payload de ciertos paquetes de un pcap
This file contains 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
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