项目作者: EONRaider

项目描述 :
A pure-Python Network Packet Sniffing tool
高级语言: Python
项目地址: git://github.com/EONRaider/Packet-Sniffer.git
创建时间: 2020-11-17T21:18:53Z
项目社区:https://github.com/EONRaider/Packet-Sniffer

开源协议:GNU Affero General Public License v3.0

下载


Python 3 Network Packet Sniffer

Python Version
OS
CodeFactor Grade
License

Reddit
Discord
Twitter

A Network Packet Sniffer developed in Python 3. Packets are disassembled
as they arrive at a given network interface controller and their information
is displayed on the screen.

This application depends exclusively on the NETProtocols
library (also developed and maintained by EONRaider)
from version 2.0.0 and above and can be run by any Python 3.8+ interpreter.

Demo

sniffer_demo

Running the Application

I. Development Mode

Simply clone this repository with git clone, install the dependencies and execute the
sniffer.py file.

  1. user@host:~$ git clone https://github.com/EONRaider/Packet-Sniffer.git
  2. user@host:~$ cd Packet-Sniffer
  3. user@host:~/packet-sniffer$ pip install -r requirements.txt <--or--> poetry install
  4. user@host:~/packet-sniffer$ sudo python3 packet_sniffer/sniffer.py

The sudo command is required due to the use of socket.SOCK_RAW,
which needs administrative privileges to run on GNU/Linux. Notice
that the existence of dependencies may require the execution of the interpreter contained in
the virtual environment in which the dependencies have been installed (if you use one),
instead of just using the system interpreter.

II. (Optional) Build the binary

Use the build.py file to compile your own binary with the PyInstaller package. You just need to install all dependencies and build.
Dependency management works with both Poetry (recommended) and Virtualenv.

  1. <-- Install dependencies as shown above in Step I -->
  2. user@host:~/packet-sniffer$ python3 build.py

Usage

  1. sniffer.py [-h] [-i INTERFACE] [-d]
  2. Network Packet Sniffer
  3. optional arguments:
  4. -h, --help show this help message and exit
  5. -i INTERFACE, --interface INTERFACE
  6. Interface from which packets will be captured (monitors
  7. all available interfaces by default).
  8. -d, --data Output packet data during capture.

The use of code contained in this repository, either in part or in its totality,
for engaging targets without prior mutual consent is illegal. It is
the end user’s responsibility to obey all applicable local, state and
federal laws.

Developers assume no liability and are not
responsible for misuses or damages caused by any code contained
in this repository in any event that, accidentally or otherwise, it comes to
be utilized by a threat agent or unauthorized entity as a means to compromise
the security, privacy, confidentiality, integrity, and/or availability of
systems and their associated resources. In this context the term “compromise” is
henceforth understood as the leverage of exploitation of known or unknown vulnerabilities
present in said systems, including, but not limited to, the implementation of
security controls, human- or electronically-enabled.

The use of this code is only endorsed by the developers in those
circumstances directly related to educational environments or
authorized penetration testing engagements whose declared purpose is that
of finding and mitigating vulnerabilities in systems, limiting their exposure
to compromises and exploits employed by malicious agents as defined in their
respective threat models.