Skip to content

Instantly share code, notes, and snippets.

@angely-dev
angely-dev / raw2pcap.py
Created February 13, 2020 16:01
Convert Huawei capture-packet output to Wireshark.
from os import remove
from re import search
from scapy.all import *
import argparse
# Usage
parser = argparse.ArgumentParser(description='Convert raw Huawei hex packets to cap file.')
parser.add_argument('--raw-file', help='the raw file location (source)', default='raw.txt')
parser.add_argument('--cap-file', help='the cap file location (destination)', default='cap.pcap')
args = parser.parse_args()