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.

Source Distribution

str2port-0.1.1.tar.gz (264.7 kB view details)

Uploaded Source

Built Distribution

str2port-0.1.1-py2.py3-none-any.whl (1.1 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file str2port-0.1.1.tar.gz.

File metadata

  • Download URL: str2port-0.1.1.tar.gz
  • Upload date:
  • Size: 264.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.5 CPython/3.7.0 Darwin/17.7.0

File hashes

Hashes for str2port-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c4b6c157178ac6a936395c670481729a3824af08631587f6e55ad5e8b94505a
MD5 95f38d2ae3d495a5db12534e17a74802
BLAKE2b-256 2c0ef07d4ff75db0c4232352b2ff0bc319a79aa667d2f2347783fca7ebc4eb8a

See more details on using hashes here.

File details

Details for the file str2port-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: str2port-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.5 CPython/3.7.0 Darwin/17.7.0

File hashes

Hashes for str2port-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 233b7f9a5cf1d0281539456c9b6eca81fd4500129aab577ec3b4844527123127
MD5 61ec2f32e1e6f8fef94fc0b8c866f230
BLAKE2b-256 52183197071f7696666fb9fec536015cd3af5d33b85f1d8aba064a95484aacd0

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