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.3.0.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for libsniffpy-0.3.0-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 400aae886c11ac2caf585d586b15f254d4eb1b4e65c10a8f92694284b7cb3054 |
|
MD5 | 8287e16a7f92c3cb61c5b69179e48979 |
|
BLAKE2b-256 | b844c5a02077bf34c0e923c145beba6b7e6d11fd6573510c3000ff2cc3cd25e9 |