All Projects → EONRaider → Packet Sniffer

EONRaider / Packet Sniffer

Licence: agpl-3.0
A pure-Python Network Packet Sniffing tool

Programming Languages

python
139335 projects - #7 most used programming language
ctypes
15 projects

Projects that are alternatives of or similar to Packet Sniffer

c-network-programming-best-snipts
Sample c network programming
Stars: ✭ 47 (-89.02%)
Mutual labels:  network-programming
arpwitch
A modern arpwatch replacement with JSON formatted outputs and easy options to exec commands when network changes are observed.
Stars: ✭ 20 (-95.33%)
Mutual labels:  network-programming
Easyserverdev
操作系统层面提供的 API 会在相当长的时间内保持接口不变,一旦学成,终生受用。理解和掌握这些基础 socket API 不仅可以最大化地去定制各种网络通信框架,更不用说使用市面上流行的网络通信库了,最重要的是,它会是你排查各种网络疑难杂症坚实的技术保障。
Stars: ✭ 323 (-24.53%)
Mutual labels:  network-programming
ReadingNotes
this is my reading notes
Stars: ✭ 16 (-96.26%)
Mutual labels:  tcp-ip
SpeedDate
SpeedDate Masterserver: Connecting Players
Stars: ✭ 24 (-94.39%)
Mutual labels:  network-programming
http-connection-lifecycle
Complete and detailed explanation of HTTP connection lifecycle
Stars: ✭ 43 (-89.95%)
Mutual labels:  tcp-ip
rips-old
Rust IP Stack - A userspace IP stack written in Rust (Work in progress)
Stars: ✭ 32 (-92.52%)
Mutual labels:  tcp-ip
Interactivecanvas
Library for distribution canvas animation over set of devices
Stars: ✭ 351 (-17.99%)
Mutual labels:  network-programming
link
A clojure framework for nonblocking network programming
Stars: ✭ 63 (-85.28%)
Mutual labels:  network-programming
Netpalm
ReST based network device broker
Stars: ✭ 270 (-36.92%)
Mutual labels:  network-programming
L2-Emulator
Implementing a Layer-2 Emulator in C using Graphs and LinkedList
Stars: ✭ 17 (-96.03%)
Mutual labels:  tcp-ip
packet
📦 Send network packets over a TCP or UDP connection.
Stars: ✭ 68 (-84.11%)
Mutual labels:  network-programming
100-redteam-projects
Projects for security students
Stars: ✭ 731 (+70.79%)
Mutual labels:  network-programming
uC-TCP-IP
A compact, reliable, high-performance TCP/IP protocol stack. Features dual IPv4 and IPv6 support, an SSL/TLS socket option, and support for Ethernet, Wi-Fi, and PHY controllers.
Stars: ✭ 66 (-84.58%)
Mutual labels:  tcp-ip
Message Io
Event-driven message library for building network applications easy and fast.
Stars: ✭ 321 (-25%)
Mutual labels:  network-programming
malloy
A C++ library providing embeddable server & client components for both HTTP and WebSocket.
Stars: ✭ 29 (-93.22%)
Mutual labels:  network-programming
xrgrpc
gRPC library for Cisco IOS XR
Stars: ✭ 40 (-90.65%)
Mutual labels:  network-programming
Game Networking Resources
A Curated List of Game Network Programming Resources
Stars: ✭ 4,208 (+883.18%)
Mutual labels:  network-programming
Mpush
MPush开源实时消息推送系统
Stars: ✭ 3,455 (+707.24%)
Mutual labels:  tcp-ip
Inet
INET Framework for the OMNeT++ discrete event simulator
Stars: ✭ 268 (-37.38%)
Mutual labels:  tcp-ip

Python 3 Network Packet Sniffer

Python Version OS CodeFactor Grade License

Reddit Discord Twitter

A simple pure-Python network packet sniffer. Packets are disassembled as they arrive at a given network interface controller and their information is displayed on the screen.

This application maintains no dependencies on third-party modules and can be run by any Python 3.x interpreter.

Installation

GNU / Linux

Simply clone this repository with git clone and execute the packet_sniffer.py file as described in the following Usage section.

[email protected]:~/DIR$ git clone https://github.com/EONRaider/Packet-Sniffer.git

Other Systems

This project is dependent on PF_PACKET - a stateful packet filter not found on Windows or Mac OS X. For demonstration purposes, you can try out this package in a Docker container. Although it will not have full access to localhost on your machine, you can still sniff on the Docker subnet and at least get the module running.

Use this command to build and run from the project directory:

docker build -t sniff . && docker run --network host sniff

Note that the entry command is simply python packet_sniffer.py, so feel free to use the full functionality of the module by overriding the default command. Remember that we tagged the container with the name "sniff" before, so we can pass command-line arguments to the sniffer in the following manner:

docker run --network host sniff [your command goes here]
echo "Now let's print help"
docker run --network host sniff python packet_sniffer.py --help

Usage of --network host is not supported on OS X or Windows so this container won't be fully functional - but you will see packets traveling within the docker subnet.

Usage

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

A pure-Python network packet sniffer.

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

Running the Application

Objective Initiate the capture of packets on all available interfaces
Execution sudo python3 packet_sniffer.py
Outcome Refer to sample output below
  • Sample output:
[>] Packet #476 at 17:45:13:
    [+] MAC ......ae:45:39:30:8f:5a -> dc:d9:ae:71:c8:b9
    [+] IPv4 ..........192.168.1.65 -> 140.82.113.3    | PROTO: TCP TTL: 64
    [+] TCP ..................40820 -> 443             | Flags: 0x010 > ACK
[>] Packet #477 at 17:45:14:
    [+] MAC ......dc:d9:ae:71:c8:b9 -> ae:45:39:30:8f:5a
    [+] IPv4 ..........140.82.113.3 -> 192.168.1.65    | PROTO: TCP TTL: 49
    [+] TCP ....................443 -> 40820           | Flags: 0x010 > ACK
[>] Packet #478 at 17:45:18:
    [+] MAC ......dc:d9:ae:71:c8:b9 -> ae:45:39:30:8f:5a
    [+] ARP Who has  192.168.1.65 ? -> Tell 192.168.1.254
[>] Packet #479 at 17:45:18:
    [+] MAC ......ae:45:39:30:8f:5a -> dc:d9:ae:71:c8:b9
    [+] ARP ...........192.168.1.65 -> Is at ae:45:39:30:8f:5a

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 by leveraging the 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].