Skip to content

yeousunn/termi-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Termi-Graph

A cyberpunk-themed Terminal User Interface (TUI) application for real-time local network scanning and visualization. It uses force-directed graph layout to display discovered devices in an interactive, visually appealing manner.

Features

  • Real-time Network Scanning: Discovers devices on the local network using ARP requests.
  • Interactive Visualization: Force-directed graph layout with Braille graphics for high-resolution terminal display.
  • Node Navigation: Cycle through discovered nodes using Tab, arrow keys, or other navigation keys.
  • Node Inspector: Detailed view of selected node including IP, MAC, ports, and ping latency.
  • Scrollable UI: Handles large numbers of nodes with scrollable lists.
  • Real-time Logs: Live logging of network events at the bottom of the interface.
  • Responsive Design: Adapts to terminal size and provides smooth, responsive interactions.

Requirements

  • Rust 1.70 or higher
  • Root privileges (for ARP scanning)
  • A terminal that supports Braille characters (most modern terminals do)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/termi-graph.git
    cd termi-graph
  2. Build the project:

    cargo build --release

Usage

Run the application with root privileges:

sudo ./target/release/termi-graph [OPTIONS]

Options

  • -s, --subnet <SUBNET>: Specify the subnet to scan in CIDR notation (e.g., 192.168.1.0/24). Default is auto, which detects the local subnet.
  • -a, --aggressive: Enable aggressive mode for faster scanning (reduced delays between packets).

Examples

  • Auto-detect subnet:

    sudo ./target/release/termi-graph
  • Specify subnet:

    sudo ./target/release/termi-graph --subnet 10.0.0.0/24
  • Aggressive scan:

    sudo ./target/release/termi-graph --aggressive
  • Combined:

    sudo ./target/release/termi-graph --subnet 192.168.1.0/24 --aggressive

Controls

  • Navigation: Use Tab, Right, Down arrows to move to the next node; Left, Up arrows to move to the previous node.
  • Quit: Press 'q' or 'Esc' to exit instantly.
  • Scrolling: The discovered nodes list is scrollable if there are more items than fit on screen.

UI Layout

  • Header: Application title.
  • Progress Bar: Shows scan progress (0-100%).
  • Network Map: 75% of the width, displays the force-directed graph of nodes.
  • Node Inspector: 25% of the map area, shows details of the selected node.
  • Discovered Nodes: Scrollable list of all found devices.
  • Network Logs: Real-time event log at the bottom.

Architecture

  • Frontend: Ratatui for TUI rendering with Braille graphics.
  • Backend: Tokio for async UI loop, Rayon for parallel physics computations.
  • Networking: Pnet for raw packet ARP scanning.
  • Physics: Custom Fruchterman-Reingold algorithm for graph layout.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

The Network Infrastructure Map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages