Skip to content

DarkCheese63/NetworkScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Auto Nmap Network Scanner

A command-line based network scanning utility built with Python. This application simplifies network reconnaissance by providing a clean, interactive interface to execute and parse complex Nmap scans effortlessly.

Features

  • Interactive CLI: Features a styled terminal interface using rich and pyfiglet for easy reading and clear navigation.
  • Versatile Scan Modes: Wraps standard Nmap arguments into user-friendly prompts. Supports Stealth (-sS), Aggressive (-A), Fast (-F), Version (-sV), OS (-O), and Ping (-sn) scans.
  • Input Validation: Built-in verification using the ipaddress module to ensure target IPs are properly formatted before initiating a scan, alongside automatic routing for localhost.
  • Parsed Output: Extracts data directly from the Nmap scan dictionary to display clean, readable results (Port states, probable Operating Systems, and service versions) without the clutter of raw Nmap output.

Tech Stack

  • Language: Python 3.11.4
  • Core Dependency: Nmap (must be installed on the host machine)
  • Network & Parsing: python-nmap, ipaddress
  • CLI Styling: rich, pyfiglet

Installation & Usage

  1. Install Nmap on your system

    • Linux: sudo apt install nmap
    • Mac: brew install nmap
    • Windows: Download the installer from the official Nmap website.
  2. Clone the repository

    • git clone https://github.com/YourUsername/NetworkScanner.git
    • cd NetworkScanner
  3. Install Python Dependencies

    • This project requires a few external Python libraries to handle the wrapper and CLI styling.
    • pip install python-nmap pyfiglet rich
  4. Run the Application

    • python network_scanner.py
    • Note: Some scans (like Stealth/SYN scans or OS detection) require root/administrator privileges. You may need to run the script using sudo python network_scanner.py depending on your OS and the scan chosen.

Security Architecture & Scan Operations

This application acts as a simplified wrapper around the powerful Nmap engine:

  1. Argument Mapping: When a user selects a scan type, the string is passed through a dictionary (scan_modes) that translates the human-readable choice into the exact Nmap execution flags (e.g., "stealth" becomes -sS).
  2. Execution: The app instantiates the nmap.PortScanner() class. It takes the validated IP address and the mapped flags to run the process silently in the background.
  3. Data Extraction: Once the scan completes, the script navigates the nested dictionaries generated by python-nmap to pull out specific keys (like osmatch, name, product, and version), presenting the user with a highly readable summary instead of raw XML or grepable terminal outputs.

Screenshots

image

About

Python Network Scanner using nmap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages