Skip to content

Automated nmap tool for discovering all devices on a wifi network and scanning them for open ports

Notifications You must be signed in to change notification settings

samjowen/auto-nmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto_nmap

A Python-based tool that brings an intuitive approach to network device and port discovery.

Installation

Our tool employs Poetry, a powerful Python dependency management system that facilitates smooth installation and package management.

Use `poetry install` to set up a Python environment that stays automatically up-to-date with the packages that auto_nmap needs.

Running Tests

For ensuring your tool's optimal performance, we recommend running the provided tests with the command:

poetry run pytest

This command will initiate the tests located in the /tests/ directory.

Commands and Their Magic

discoverDevices

Discover every device on your network in a snap with the discoverDevices command.

  • poetry run discoverDevices - Prints out the discovered devices and their respective IPs on your command line.
  • poetry run discoverDevices --output device-ips-on-my-wifi.txt - Saves the IPs of all discovered devices into a file.
  • discoverPorts

    Leverage the discoverPorts command to scan and identify open ports on your network devices.

  • poetry run discoverPorts .../txt-files/device-ips-on-my-wifi.txt --ports 22 - Scans a specified port across a list of IPs.
  • poetry run discoverPorts --i 192.168.1.1 --ports 22-999 - Scans a range of ports for a specific IP.
  • poetry run discoverPorts --list .../txt-files/lieksa.txt --ports 1-888 --output lieksa - Scans a range of ports across a list of IPs and stores the results into a file.
  • Code Overview

    Our Python script employs classes and methods to perform network scanning tasks effectively.

    The Scan class is the heart of our program, encapsulating several methods that perform network scanning.

    The methods in the Scan class include:

    get_default_gateway_ip_address: Returns the default gateway IP address of your machine.
    ip_address_to_ip_address_range: Converts an IP address to an IP address range.
    nmap_ping_scan: Executes an nmap ping scan on a given IP or IP range, returning the found hosts.
    write_ip_addresss_to_file: Stores the found hosts into a specified file.
    nmap_port_scan_multihost: Conducts an nmap port scan on multiple hosts and records the results into a specified file.
    

    About

    Automated nmap tool for discovering all devices on a wifi network and scanning them for open ports

    Topics

    Resources

    Security policy

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages