Skip to content

Latest commit

 

History

History
52 lines (45 loc) · 1.93 KB

README.md

File metadata and controls

52 lines (45 loc) · 1.93 KB

Packet Sender

Layer 2 packet constructor and sender using Python

Table of Contents

Environment

  • Ubuntu Desktop 20.04 with linux kernel 5.4.0-58-generic
  • Python 3.8.5

Used Library

Run Directly

  1. Install requirements inside a virtual environment
nick@nick:~/packet-sender$ sudo pip3 install virtualenv
nick@nick:~/packet-sender$ virtualenv venv
nick@nick:~/packet-sender$ source ./venv/bin/activate
(venv) nick@nick:~/packet-sender$ pip3 install PySide2 netifaces
(venv) nick@nick:~/packet-sender$ deactivate
  1. Run ./main.py with sudo using ./venv/bin/python3: sudo ./venv/bin/python3 ./main.py

Build Executable

Don't do this since it'll create a 131MB executable, which is kinda ridiculous.

  1. Install pyinstaller: sudo pip3 install pyinstaller
  2. Run pyinstall --onefile ./main.py
  3. Run ./main with sudo: sudo ./main

Folder Structure

  • ./main.py: Program entrance
  • ./ICMPexample.py: Example of library usage
  • ./lib: Self-defined libraries
    • ./lib/packet.py: Packet factory classes of different protocols
    • ./lib/helper.py: Packet unpack class, constants, helper functions
  • ./views: Qt frontend
    • ./views/*.py: Views of different protocols
    • ./views/widgets/info.*.py: Visualization of unpacked data

API Reference

See ./docs/api for library usage

Program Usage

See ./docs/program for program usage