Skip to main content

A library for scanning ports and identifying services

Project description

ThePort 2.1.1

ThePort is a Python library for scanning ports and identifying running services on a specified IP address. It allows users to find open ports and check their statuses.

  • By using this tool you can scan ports very deep and list ports

Table of Contents

Installation

To install ThePort, you can use pip:

pip install theport

Usage

Basic Port Scanning

To scan ports on a specific IP address and print the status of each port:

from theport import scan_ports

# Example IP address to scan
ip_address = '199.36.158.100'

# Custom list of ports to scan
custom_ports = [22, 80, 443, 3306, 8080]

# Start scanning
open_ports, closed_ports = scan_ports(ip_address, custom_ports)

# Print results
for port, service in open_ports:
    print(f"Port {port} is open: {service}")

for port in closed_ports:
    print(f"Port {port} is closed")

Scanning with User-Defined Ports

You can specify your own list of ports to scan as follows:

from theport import scan_ports

# Example IP address to scan
ip_address = '199.36.158.100'

# Custom list of ports to scan
custom_ports = [21, 25, 80, 443]

# Start scanning
open_ports, closed_ports = scan_ports(ip_address, custom_ports)

# Print results
for port, service in open_ports:
    print(f"Port {port} is open: {service}")

for port in closed_ports:
    print(f"Port {port} is closed")

Scanning All Ports

To scan all ports in the full range (1-65535):

from theport import scan_ports

# Example IP address to scan
ip_address = '199.36.158.100'

# Start scanning all ports
open_ports, closed_ports = scan_ports(ip_address)

# Print results
for port, service in open_ports:
    print(f"Port {port} is open: {service}")

for port in closed_ports:
    print(f"Port {port} is closed")

Available Ports

ThePort supports a variety of commonly used ports, including but not limited to:

  • HTTP: 80
  • HTTPS: 443
  • FTP: 21
  • SMTP: 25, 587
  • MySQL: 3306
  • SSH: 22
  • Telnet: 23
  • RDP: 3389
  • PostgreSQL: 5432
  • Redis: 6379
  • MongoDB: 27017

Feel free to extend the list as per your needs.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

If you would like to contribute to ThePort, please open an issue or submit a pull request. Any help is greatly appreciated!

Acknowledgments

Thank you for using ThePort! We appreciate your interest and support. If you find any issues or have suggestions, please let us know.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

theport-2.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

theport-2.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file theport-2.1.1.tar.gz.

File metadata

  • Download URL: theport-2.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for theport-2.1.1.tar.gz
Algorithm Hash digest
SHA256 1cf23e22a855b1a0265830262e2fbebdde670b6a840ba4b8006cea402193627c
MD5 e9c87900bf0ff049d1be63954dd628ce
BLAKE2b-256 af9a4d874464133b33ff6836d417e1e6de91e330183b79d5e0fc5fc021a00c86

See more details on using hashes here.

File details

Details for the file theport-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: theport-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for theport-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a9a753cacecefec734e860f4c787a3da75a4a6f93305bd86fc210c55fda2af1
MD5 93fce80b8e129fa1561c2f2413d89dbd
BLAKE2b-256 7c7370f114ff8dc619973478759a2dbab0c4995d784a51c283a3120181759883

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page