A python3 wrapper around libsniff
Project description
libsniffpy
Motivation
I wanted to have a nice cython/python wrapper around libsniff. This name might confuse you, I just care about sniffing wifi packets from a nic in monitor mode.
Installation
pip install libsniffpy
Usage
from sniff import get_socket
# You might have to adjust
s = get_socket("wlan0mon")
# or whatever big number, forgot how big those frames are lel
pkg = s.recv(3000)
# do some parsing magic, out of scope for this package
Guidance for n00bs
This lib opens a raw socket for a monitor mode enabled interface. It needs privs that your user probably don't have.
Either you run this stuff as root
or you do sth like this:
sudo setcap cap_net_raw,cap_net_admin=eip
on a wrapper script that calls your python interpreter.
License
This project is licensed under the GPL-3 license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
libsniffpy-0.2.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for libsniffpy-0.2.0-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 280cbb95c25888df3ea08d0a79e680f65adbd82fe050fe13f39c84aefa0ca05c |
|
MD5 | e899d93cfd1cf386eb9b201a5b587e01 |
|
BLAKE2b-256 | 99d35cdf34a335159948a5ae22a666a75d1dc32c5d5e586cbdcfd05d35ccf949 |