Skip to main content

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

Project description

str2port

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.0.tar.gz (264.5 kB view hashes)

Uploaded Source

Built Distribution

str2port-0.1.0-py2.py3-none-any.whl (1.1 MB view hashes)

Uploaded Python 2 Python 3

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