foxsniff
Minimal raw-socket IPv4 packet sniffer for Linux. No dependencies, no BPF filter syntax to learn — just a small, readable script that unpacks Ethernet and IPv4 headers by hand.
Install
pip install foxsniff
Or from source:
git clone https://github.com/foxhackerzdevs/foxsniff.git
cd foxsniff
pip install -e .
Usage
Requires root (raw sockets):
sudo foxsniff
Listening for incoming packets...
[+] IPv4 Packet: 192.0.2.1 -> 192.0.2.2
|- Ethernet Frame: MAC Src: 02:FC:00:00:00:05 | MAC Dst: 02:FC:00:00:00:01
|- Protocol: 6 | TTL: 60
Ctrl+C to stop.
How it works
Opens an AF_PACKET/SOCK_RAW socket (Linux-specific) and manually unpacks each captured frame:
- Ethernet header (14 bytes): destination MAC, source MAC, EtherType — filters for
0x0800(IPv4) - IPv4 header (first 20 bytes, correctly handling variable-length headers with options via IHL): TTL, protocol number, source/destination IP
No libpcap, no scapy — just socket and struct from the standard library.
Requirements
Python >= 3.8, Linux (uses AF_PACKET, not portable to other platforms — see the note in main()).
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file foxsniff-0.1.0.tar.gz.
File metadata
- Download URL: foxsniff-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40da02de67fad6b4e4b24222fc64dc4dc9f2f36c9f70b809aed375cc327cd6d5
|
|
| MD5 |
626b8a169767bcf3c2433cb2d44c643d
|
|
| BLAKE2b-256 |
bde4fe5c7e155f99a34bfb35152d279e1be175a3aa92245b9ea7b6c71f287946
|
File details
Details for the file foxsniff-0.1.0-py3-none-any.whl.
File metadata
- Download URL: foxsniff-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
406a8724837fd84a0a344db8609d27caa854627dba79df0563786144511b12bb
|
|
| MD5 |
e2740a4d25201aa5ae8c3c88d386d1c0
|
|
| BLAKE2b-256 |
57bca09de92c3a652c0ba1b01101f9aea1af9f252d0b361328dddce8babd9f01
|