split tcp streams using scapy
Latest commits
| Commit | Message | Author | Date |
|---|---|---|---|
| 11206b4a71 | Use correct ACK number if midstream TCP traffic. | lns | 3 years ago |
| c2fb6cdba5 | Add BPF support. | lns | 3 years ago |
| 3dde54a04e | Support splitting of midstream TCP flows. | lns | 3 years ago |
| 13de32fa34 | Initial commit. | lns | 4 years ago |
Branches
| Name | Target | Subject | Date |
|---|---|---|---|
| main | 11206b4a71 | Use correct ACK number if midstream TCP traffic. | 3 years ago |
README
tcp-split
This project is mostly used for my personal research and testing purposes.
Split TCP segments of a stream into smaller ones using Scapy and PCAP files. Inspired and Copy&Paste from scapy-tcp-extractor.
usage: TCPSplit.py [-h] [-o OUTPUT] [-s] [-l LENGTH] [-b BPF] input
positional arguments:
input PCAP input file
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
PCAP output file
-s, --summary Print found TCP Streams to stdout
-l LENGTH, --length LENGTH
Split TCP payload every n bytes
-b BPF, --bpf BPF BPF filter to apply
You can use the example.pcapng which contains two TCP Streams with some ASCII content by typing:
./TCPSplit.py -o ./splitted.pcap -l1 -s ./example.pcapng
This will print a summary of all found TCP streams and split the TCP segments into segments of 1 byte size. The resulting splitted.pcap file should contain valid TCP streams.