Skip to main content

Port Miner ⛏️

PyPI version Python Version License: GPL-3.0-or-later Downloads Total Downloads Status

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 ThreadPoolExecutor to check multiple ports concurrently.
  • 🧩 Minimal dependencies: Uses modules such as socket, urllib.parse, and concurrent.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

  1. Install Port Miner.
  2. Import the scan_ports function.
  3. Run the scanner.
  4. Enter the target when prompted.
  5. 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.

👨‍💻 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)

Source distribution for PortMiner 0.2.1
File Size Uploaded
portminer-0.2.1.tar.gz 18.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PortMiner 0.2.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page