utility that pops Juniper Ethernet headers from a .pcap file
Project description
jepop - pops Juniper Ethernet headers from a .pcap file
Usage
usage: jepop [-h] [--overwrite] [--dmac DMAC] [--smac SMAC] [--vlans VLANS] inpcap outpcap
Packets captured on wan interfaces contain hostpath packets
Hostpath packets contain an additional Juniper Ethernet header which is not understood outside of Juniper products
This limits the ability to use these .pcap files with tools such as tcpreplay, ngrep, tcpflow and more
This utility reads packets from a .pcap file, pops the Juniper Ethernet header if found, then writes the packets to a new .pcap
It uses scapy (https://scapy.net) to achieve this
Hostbound packets (input direction) may have L2 headers stripped by the PFE, in this case a crafted Ethernet header is added
By default the crafted Ethernet header src and dst macs will be all zeros, you can specify macs with the smac
and dmac
options
Additionally, you can specify add up to 2 vlan tags to be added with the vlans
option
- Reads packets from
inpcap
into a PacketList - Each packet is checked for the presence of the Juniper Ethernet header
-- If found, the l2_header_presence bit is used to determine if the payload is L2
-- If L2, Juniper Ethernet header is popped and packet is appended to the output PacketList
-- If not L2, the payload_type field is used to determine the L3 payload
-- A new packet is created with a crafted Ethernet header, any vlans specified, and the L3 payload
-- Packet is appended to output PacketList - Output PacketList is written to
outpcap
OPTIONAL ARGUMENTS
smac
- source mac to be added to crafted L2 header
dmac
- destination mac to be added to crafted L2 header
vlans
- dot1q vlans to be added after crafted L2 header
overwrite
- allows output file to be overwritten
LICENSE
GPL-2.0
CONTRIBUTORS
Juniper Networks is actively contributing to and maintaining this repo
Please contact jnpr-community-netdev@juniper.net for any queries
Contributors:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jepop-0.0.1.tar.gz
.
File metadata
- Download URL: jepop-0.0.1.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c46fde2001910257090208089764690d5bf03a8d53380201ea868855dbdcae12 |
|
MD5 | 0289f51d9449f0a4d06ec8a4bdd9f33f |
|
BLAKE2b-256 | a1d05e6349dedeb93c47be29d76ab54c9f071a034a7834de43736f379f95fd12 |
File details
Details for the file jepop-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: jepop-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f5a77ac73a26e7013eddab0836d30b406af5b17429861f7e799a5d67125829f |
|
MD5 | ad974e3a4f02d86800dc39fb192d4f9c |
|
BLAKE2b-256 | 8fefe23b2dd335078f2e5f2a70346d871bf30aca31733990d768e4ce4bdf78ad |