$ show bitbrute/evillimiter
Evil Limiter is a Linux command-line tool that uses ARP spoofing and traffic shaping (tc/iptables) to monitor, analyze, and limit the bandwidth of devices on a local network without requiring administrative access to those devices. It provides an interactive shell with commands to scan for hosts, limit or block bandwidth per host (upload/download), monitor real-time bandwidth usage, and detect host IP changes. The architecture is a single-threaded interactive menu with background threads for ARP spoofing, bandwidth monitoring, and reconnection watching. It depends on scapy for packet manipulation, netifaces for network interface info, and standard Linux utilities (tc, iptables, sysctl). The codebase is well-organized into modules for console UI, networking operations, and command parsing, but lacks tests and has limited reusability outside its specific purpose.
The LLM identified 2 files worth highlighting for reuse:
Contains the `BitRate` and `ByteValue` classes, which are self-contained value objects that represent network bandwidth rates and byte sizes. They support arithmetic operations, string formatting (e.g., '10mbit', '500kb'), and parsing from human-readable strings. These classes are cleanly implemented, have no internal dependencies on the rest of the project, and could be extracted into any Python project that needs to handle bandwidth units with proper conversion and display.
Implements a `CommandParser` class that provides a lightweight, recursive command-line argument parser specifically designed for interactive menu systems. It supports flags, parameterized flags, positional parameters, and nested subparsers (e.g., 'watch add', 'watch set'). The parser returns named tuples with parsed values and calls handlers on subparser completion. While it currently uses the project's `IO` class for error messages, the core parsing logic is self-contained and could be extracted with minimal modification to serve as a standalone library for building interactive CLI applications.