- install dependencies
> sudo apt-get install isolinux xorriso
- get Debian netinst iso
- create iso org dir
> mkdir iso-org
""" | |
This demo of the dispatch_hook uses a hypothetical protocol running on | |
top of Ethernet using Ether-type 0xa5b4: | |
Ethernet [ Foo | Bar ] Baz | |
Foo : Type String | |
Bar : Type Short String |
from scapy.all import * | |
from scapy.layers.l2 import * | |
import socket | |
ETH_P_ALL = 0x0003 | |
s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(ETH_P_ALL)) | |
def dump_layers(frm): |
#! /bin/bash | |
# | |
# namespace namespace | |
# mac_sec_ns_0 mac_sec_br mac_sec_ns_1 | |
# +-----------+-----------+ | |
# mac_sec_0_0----|mac_sec_0_1|mac_sec_0_1|----mac_sec_1_0 | |
# +-----------+-----------+ | |
# | |
ip link add dev mac_sec_if_0_0 type veth peer name mac_sec_if_0_1 |
from scapy.all import * | |
class FooSocket(Thread, SuperSocket): | |
def __init__(self, frame_defs): | |
super(FooSocket, self).__init__() | |
self._frame_defs = frame_defs | |
self.ins = None | |
def __enter__(self): |