Skip to content
/ Parcel Public

Python script used to simulate imperfect network conditions on a Linux OS

Notifications You must be signed in to change notification settings

bx-r0/Parcel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parcel

Codacy Badge

Lightweight packet manipulation script built on top of the Linux NFQUEUE. Designed to simulate common forms of network degradation.

Effects

  • Latency
  • Packet loss
  • Restricted bandwidth
  • Packet surges

Extra features

  • Printing packets
  • Display current bandwidth
  • Saving to .pcap files
  • Filter by protocol

Installation

Method 1 - Pre-compiled Binary (Recommended)

Download the pre-compiled binary

64-bit

32-bit

Method 2 - Install and run using Python

Install - Debian or Ubuntu

sudo apt-get install build-essential python-dev libnetfilter-queue-dev
sudo pip install -r requirements.txt

Install - Arch

Install aur/python-netfilterqueue-git https://aur.archlinux.org/packages/python-netfilterqueue-git/

sudo pip install -r requirements.txt

Usage

Run sudo Parcel.py -h for the usage

Packet print

Command will print all packets flowing in and out of the current machine:

sudo python Parcel.py -p

Filter TCP

To filter for certain packets for a certain protocol the -tp is used:

sudo python Parcel.py -p -tp TCP

Usage

EFFECTS
Only one effect can be selected 

-p                      Prints all the packets
-i                      Does nothing to the packets. Used to show how much default overhead there is
-b                      Displays information on the transfer rate
-l    <delay_ms>        Applies latency on the connection   
-pl   <percentage>      Performs packet loss on the connection
-t    <delay_ms>        Creates a packet surge on a connection by the given delay 
-rl   <rate_bytes>      Limits the throughput of the program
    
OPTIONS 
Can be used with any effect

-tp   <packet-type>     Only performs an effect on the specified packet type
 -s   <filename>         Saves all collected packets into a .pcap file

About

Python script used to simulate imperfect network conditions on a Linux OS

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages