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
inpcapinto 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:
Release files for jepop 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jepop-0.0.1.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jepop-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.4 kB
Release files / jepop-0.0.1.tar.gz
| Download URL | jepop-0.0.1.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c46fde2001910257090208089764690d5bf03a8d53380201ea868855dbdcae12
|
|
BLAKE2b-256 checksum How to use checksums |
a1d05e6349dedeb93c47be29d76ab54c9f071a034a7834de43736f379f95fd12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.12
|
Release files / jepop-0.0.1-py3-none-any.whl
| Download URL | jepop-0.0.1-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f5a77ac73a26e7013eddab0836d30b406af5b17429861f7e799a5d67125829f
|
|
BLAKE2b-256 checksum How to use checksums |
8fefe23b2dd335078f2e5f2a70346d871bf30aca31733990d768e4ce4bdf78ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.12
|