Port Miner ⛏️
Port Miner is a simple, lightweight, and easy-to-use port scanner built with pure Python.
It allows users to provide a URL or hostname, checks a predefined list of common network ports, and displays the ports that are open and reachable.
Port Miner focuses on simplicity, minimal dependencies, and an easy setup process. It is designed as a small networking utility and a learning project for developers interested in Python, sockets, and basic network scanning.
✨ Features
- ⚡ Lightweight: Designed to be simple and straightforward.
- 🐍 Pure Python: Uses Python's standard library without requiring third-party runtime packages.
- 🌐 URL and hostname input: Accepts a target for port scanning.
- 🔎 Common port scanning: Checks a predefined list of ports.
- 🎯 Simple output: Displays detected open ports.
- 🧵 Concurrent scanning: Uses
ThreadPoolExecutorto check multiple ports concurrently. - 🧩 Minimal dependencies: Uses modules such as
socket,urllib.parse, andconcurrent.futures. - 💻 Cross-platform: Intended for Windows, Linux, and macOS.
- 📦 PyPI distribution: Installable through Python's package manager.
🛠 Requirements
- Python 3.7 or newer
- An internet or network connection to reach the target
- Permission to scan the target system
Port Miner uses Python's standard library and does not require additional runtime dependencies.
📦 Installation
Install from PyPI
Install the latest published release using pip:
pip install PortMiner
Verify the installation
pip show PortMiner
🚀 How to Use
Import scan_ports from the package and call the function:
from PortMiner import scan_ports
scan_ports()
The scanner will prompt you for the target and check its predefined list of ports.
Example workflow
- Install Port Miner.
- Import the
scan_portsfunction. - Run the scanner.
- Enter the target when prompted.
- Review the open ports reported by the program.
The exact output depends on the target, its network configuration, and which services are reachable.
⚙️ How It Works
Port Miner uses Python's networking capabilities to attempt connections to selected ports.
socket: Provides the networking functionality used to test port connections.urllib.parse: Helps parse URL-related input.ThreadPoolExecutor: Enables concurrent execution of port checks.
A port is reported as open when the scanner's connection test indicates that it is accepting connections. Network restrictions, firewalls, timeouts, and filtering may affect the results.
🌍 Supported Platforms
Port Miner is intended to work on:
- Windows
- Linux
- macOS
The actual results may vary depending on the operating system, network configuration, and target accessibility.
🔐 Responsible Use
Port Miner is a networking utility intended for educational purposes and authorized testing.
Only scan systems and networks that you own or have explicit permission to test. Unauthorized scanning may violate organizational policies or applicable laws.
An open port does not necessarily indicate a vulnerability. Port Miner reports connection-related information and should not be treated as a complete security audit.
📄 License
Port Miner is distributed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).
You may use, study, modify, and redistribute the software under the terms of this license. When distributing covered copies or modified versions, you must comply with the applicable GPL requirements, including source-code availability and preservation of required notices.
See the LICENSE file for the complete license text.
Official license information: GNU GPL v3.0.
🔗 Links
- PyPI: https://pypi.org/project/PortMiner/
- GitHub: https://github.com/MobinSalehiP/Port-Miner
- License: LICENSE
👨💻 Author
Mobin Salehi
If you find a bug or have an idea for an improvement, you can open an issue in the GitHub repository or send email. Email : salehimobin343@gmail.com
Port Miner: simple tools for exploring urls ports with Python.
Metadata
Release files for PortMiner 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| portminer-0.2.1.tar.gz | 18.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| portminer-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.3 kB
Release files / portminer-0.2.1.tar.gz
| Download URL | portminer-0.2.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4800f1c4ed6abc79265f2c3a97c4d9bd3b7da4582177efe46639ad6b4ff8619
|
|
BLAKE2b-256 checksum How to use checksums |
f556a3a0bce0f753085b550ad63aafa3e9fb2c417b1284e3afdca77b5b119790
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.4
|
Release files / portminer-0.2.1-py3-none-any.whl
| Download URL | portminer-0.2.1-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03978c13f5828463f36c59c8dda202da6ccca02414ac3fbd3751f3b3085595bb
|
|
BLAKE2b-256 checksum How to use checksums |
925b0e582c569f9ddafbe43a9ebf165e725779b05bb52e89a3fff6647221943e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.4
|