• Stars
    star
    645
  • Rank 69,781 (Top 2 %)
  • Language
    Python
  • License
    GNU Affero Genera...
  • Created about 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Network Packet Sniffing tool developed in Python 3.

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.

user@host:~$ git clone https://github.com/EONRaider/Packet-Sniffer.git
user@host:~$ cd Packet-Sniffer
user@host:~/packet-sniffer$ pip install -r requirements.txt <--or--> poetry install
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.

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

Usage

sniffer.py [-h] [-i INTERFACE] [-d]

Network Packet Sniffer

optional arguments:
  -h, --help            show this help message and exit
  -i INTERFACE, --interface INTERFACE
                        Interface from which packets will be captured (monitors
                        all available interfaces by default).
  -d, --data            Output packet data during capture.

Legal Disclaimer

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.

More Repositories

1

blackhat-python3

Source code for the book "Black Hat Python" by Justin Seitz. The code has been fully converted to Python 3, reformatted to comply with PEP8 standards and refactored to eliminate dependency issues involving the implementation of deprecated libraries.
Python
1,791
star
2

violent-python3

Source code for the book "Violent Python" by TJ O'Connor. The code has been fully converted to Python 3, reformatted to comply with PEP8 standards and refactored to eliminate dependency issues involving the implementation of deprecated libraries.
Python
908
star
3

Arp-Spoofer

A pure-Python ARP Cache Poisoning (a.k.a "ARP Spoofing") tool
Python
232
star
4

BCA-Phantom

A multi-platform HTTP(S) Reverse Shell Server and Client in Python 3
Python
91
star
5

Simple-Async-Port-Scanner

A simple asynchronous TCP/IP Connect Port Scanner in Python 3
Python
77
star
6

BCA-Reaper

Log keystrokes, take screenshots and grab system information from a target host and exfiltrate to Discord and Google Forms.
Python
18
star
7

NETProtocols

Low-level implementations of common networking protocols in Python 3
Python
8
star
8

Web-Probe

Web Probe is a Python 3 asynchronous port scanner with the purpose of checking live web servers
Python
7
star
9

QR-Code-Component

Solution for the QR Code Component challenge on frontendmentor.io
CSS
3
star
10

ReconLib

A collection of modules and helpers for active and passive reconnaissance of remote hosts
Python
2
star
11

SingleThreadedTCPScanner

Python
1
star
12

SubStalker

Find subdomains belonging to given target hosts using active and passive enumeration methods
Python
1
star
13

subdomain-enumerator

Python
1
star
14

MultiThreadedTCPScanner

Python
1
star