Skip to content

Instantly share code, notes, and snippets.

@Heaciy
Heaciy / gen_http_pcap.py
Last active November 15, 2024 02:20
Generate pcap file of http1.1 using scapy
# -*- encoding: utf-8 -*-
import json
import random
import hashlib
from typing import List, Dict
from http import HTTPStatus, HTTPMethod
from scapy.utils import wrpcap
from scapy.packet import Packet
from scapy.layers.l2 import Ether