Skip to main content

Convert string to md5 hash, then to port number. No randomization involved.

Project description

str2port

PyPI version shields.io PyPI license

Convert string to md5 hash, then to port numbers. No randomization involved.

Every time you run the script, it will return the same port numbers.

Installation

pip install str2port

Usage

str2port is available is a CLI app,

$ str2port --help
Usage: str2port [OPTIONS] STRING

Options:
  --use-iana  Exclude used ports from IANA list (default: false)
  --help      Show this message and exit.
$ str2port imserv
29635 44619 3226 6562 52589 12473 1423 1026
$ str2port imserv
29635 44619 3226 6562 52589 12473 1423 1026

Of course, it is also accessible via a Python script

>>> from str2port import str2port
>>> str2port('imserv')
[29635, 44619, 3226, 6562, 52589, 12473, 1423, 1026]

Project details


Download files

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

Files for str2port, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size str2port-0.1.1-py2.py3-none-any.whl (1.1 MB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size str2port-0.1.1.tar.gz (264.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page