Ny-Scan is a professional Python tool for host and port discovery, leveraging the power of Nmap. It provides a convenient command-line interface and a modern GUI for performing a variety of network reconnaissance scans, making it ideal for penetration testers, network administrators, and cybersecurity enthusiasts.
Ny-Scan/
├── src/
│ ├── gui.py # Graphical User Interface (GUI)
│ ├── scanner.py # Core scanning logic
│ └── scaning.py # Command-Line Interface (CLI)
├── requirements.txt
├── README.md
├── LICENSE
└── ...
- The command-line interface (CLI) is in:
src/scaning.py
- The graphical user interface (GUI) is in:
src/gui.py
- Host discovery using multiple Nmap techniques
- Port discovery with advanced scan types
- Easy-to-use command-line interface
- Modern graphical user interface (GUI)
- Informative logging and error handling
- Designed for Linux environments (Kali/Parrot preferred)
- Python 3.7+
- Nmap must be installed and available in your system PATH
- See
requirements.txt
for details
- Clone this repository:
git clone https://github.com/yourusername/Ny-Scan.git cd Ny-Scan
- (Optional) Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
- Install Python dependencies:
pip install -r requirements.txt
- Ensure Nmap is installed:
sudo apt update && sudo apt install nmap
- (Optional, for GUI) Install Tkinter if not already available:
sudo apt install python3-tk
Run the script with root privileges for best results.
- Run the CLI:
or with arguments:
sudo python3 src/scaning.py
sudo python3 src/scaning.py --mode port --target 192.168.1.10 --ports 22,80,443
- Run the GUI (requires Tkinter):
sudo python3 src/gui.py
- The GUI provides fields for scan mode, target, and ports, and displays results in a user-friendly window.
- Interactive Menu:
- If you run the CLI script without any arguments, an interactive menu will guide you through selecting the scan mode, entering the target, and (for port scans) specifying ports.
- Command-line Arguments (CLI):
- Provide CLI arguments (
--mode
,--target
, etc.) to skip the menu.
- Provide CLI arguments (
- Graphical User Interface (GUI):
- Use the GUI for a point-and-click experience. All scanning logic is shared with the CLI for consistency.
--mode
(required if not using menu):host
for host discovery,port
for port discovery--target
(required if not using menu): Target IP address, range, subnet, or hostname (e.g.,192.168.1.1
,192.168.1.0/24
,192.168.1.1-10
)--ports
(optional, port scan only): Ports to scan (single, comma-separated, or range, e.g.,80,443,1000-2000
). Default:1-1024
- Host Discovery (on a subnet):
sudo python3 src/scaning.py --mode host --target 192.168.1.0/24
- Port Discovery (on a single IP and specific ports):
sudo python3 src/scaning.py --mode port --target 192.168.1.10 --ports 22,80,443
- Port Discovery (on a range of IPs and port range):
sudo python3 src/scaning.py --mode port --target 192.168.1.10-192.168.1.20 --ports 1000-2000
- Port Discovery (default ports 1-1024):
sudo python3 src/scaning.py --mode port --target 192.168.1.10
This project is licensed under the MIT License. See LICENSE for details.
Contributions are welcome! Please open issues or submit pull requests for improvements. See CONTRIBUTING.md for guidelines.
Please note that this project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
- Nmap
- Python community