Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Network Mapper

Lightweight Network Discovery & Port Scanner

Network Mapper is a single-file Python CLI for Windows-focused network discovery, TCP scanning, UDP probing, banner grabbing, OS guessing, and report export. Use it only on networks and systems you own or have explicit permission to test.

Files

xmapper/
├── main.py
└── README.md

Install

Python 3.11+ is required.

cd C:\Users\kapuc\OneDrive\Plocha\MujServer\xmapper
pip install rich colorama

rich and colorama improve the Windows terminal UI. The scanner still runs with plain output if they are missing.

Usage

Double-clicking the script or EXE opens an interactive menu instead of closing immediately.

python main.py --help
python main.py scan 192.168.1.15
python main.py scan 192.168.1.0/24 --html reports\scan.html
python main.py ping 192.168.1.10-30
python main.py tcp 192.168.1.15 --ports 22,80,443,3389
python main.py udp 192.168.1.15 --ports 53,123,161 --timeout 2
python main.py banner 192.168.1.15 --ports 22,80,443
python main.py os 192.168.1.15
python main.py report reports\latest.html

Targets

Supported target formats:

  • Single IP: 192.168.1.15
  • CIDR subnet: 192.168.1.0/24
  • IP range: 192.168.1.10-192.168.1.50
  • Short IPv4 range: 192.168.1.10-50

Ports

Supported port formats:

  • Top/common ports: --ports top
  • Single port: --ports 443
  • Custom list: --ports 22,80,443
  • Range: --ports 1-1024
  • Mixed: --ports 22,80,443,8000-8100

Configuration

Configuration is optional and loaded with --config.

{
  "timeout": 1.0,
  "threads": 256,
  "max_workers": 512,
  "common_tcp_ports": [21, 22, 80, 443, 3389],
  "common_udp_ports": [53, 67, 68, 123, 161],
  "report_folder": "reports",
  "color_theme": "dark",
  "banner_timeout": 1.5,
  "ping_timeout_ms": 1000
}

Example:

python main.py --config config.json scan 192.168.1.0/24

Exports

Every scan writes reports\last_scan.json for later report rendering. You can also request explicit exports:

python main.py scan 192.168.1.0/24 --json reports\scan.json --csv reports\scan.csv --html reports\scan.html
python main.py report reports\latest.html

Logging

python main.py --log-level DEBUG --log-file reports\networkmapper.log tcp 192.168.1.15 --ports 1-1024

Supported levels are INFO, WARNING, ERROR, and DEBUG.

Build EXE

Install PyInstaller and build a single Windows executable:

pip install pyinstaller
pyinstaller --onefile --console --name networkmapper main.py
.\dist\networkmapper.exe --help

Notes

  • TCP scanning uses a fast connect scan with a thread pool.
  • Ping sweep and OS guessing use asynchronous subprocess calls.
  • UDP scanning is best-effort because silent UDP timeouts may mean open, filtered, or dropped traffic.
  • OS detection is a heuristic based on TTL, so treat it as a clue rather than proof.

About

XMAPPER is a lightweight Python network discovery and port scanner with ping sweep, TCP/UDP scanning, banner grabbing, OS guessing, and clean HTML/JSON/CSV reports.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages