Skip to content

vinesmsuic/Pcap-To-Img

Repository files navigation

Pcap-To-Img

A Modified version of USTC-TK2016 Tools

  • For Windows only

Before Preprocessing

Convert PcapNG Files to Pcap Files

If you are using PcapNG (.pcapng) Files

Sometimes pcapng will also shown as .pcap file.

editcap -F libpcap dump.pcapng dump.pcap

Usage of Tools

Run Powershell as Administrator

set-ExecutionPolicy RemoteSigned

Preprocessing

Split Pcap files into Flows

.\1_Pcap2Flow.ps1
python .\2_Flow2Packet.py
usage: 2_Flow2Packet.py [-h] --packet PACKET --byte BYTE [--limit LIMIT]

Selecting Parameter of Packets and Bytes.

optional arguments:
  -h, --help       show this help message and exit
  --packet PACKET  number of required packets
  --byte BYTE      number of trimmed byte
  --limit LIMIT    only extract packets from the largest N flows
python .\3_Packet2Image.py

About

Modified version of USTC-TK2016: Toolkit for processing PCAP file and transform into image data for training

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published