{ "info": { "author": "Nicolas Crocfer", "author_email": "ncrocfer@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "whatportis\n==========\n\n.. image:: https://travis-ci.org/ncrocfer/whatportis.svg?branch=master\n :target: https://travis-ci.org/ncrocfer/whatportis\n\n.. image:: https://badge.fury.io/py/whatportis.svg\n :target: https://pypi.python.org/pypi/whatportis/\n\n.. image:: https://img.shields.io/badge/python-2.x%20|%C2%A03.x-blue.svg\n :target: https://pypi.python.org/pypi/whatportis/\n\n.. image:: https://img.shields.io/github/license/ncrocfer/whatportis.svg\n :target: https://github.com/ncrocfer/whatportis/blob/master/LICENSE.txt\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/python/black\n\nIt's a common task to search the default port number of a service. Some ports are available in the :code:`/etc/services` file, but the list is not complete and this solution is not portable.\n\nWhatportis is a simple tool that downloads the `Iana.org `_ database and uses it to explore the official list of ports.\n\nUsage\n-----\n\nWhatportis allows you to find what port is associated with a service:\n\n.. code-block:: shell\n\n $ whatportis redis\n +-------+------+----------+---------------------------------------+\n | Name | Port | Protocol | Description |\n +-------+------+----------+---------------------------------------+\n | redis | 6379 | tcp | An advanced key-value cache and store |\n +-------+------+----------+---------------------------------------+\n\nOr, conversely, what service is associated with a port number:\n\n.. code-block:: shell\n\n $ whatportis 5432\n +------------+------+----------+---------------------+\n | Name | Port | Protocol | Description |\n +------------+------+----------+---------------------+\n | postgresql | 5432 | tcp, udp | PostgreSQL Database |\n +------------+------+----------+---------------------+\n\nYou can also search a pattern without knowing the exact name by adding the :code:`--like` option:\n\n.. code-block:: shell\n\n $ whatportis mysql --like\n +----------------+-------+----------+-----------------------------------+\n | Name | Port | Protocol | Description |\n +----------------+-------+----------+-----------------------------------+\n | mysql-cluster | 1186 | tcp, udp | MySQL Cluster Manager |\n | mysql-cm-agent | 1862 | tcp, udp | MySQL Cluster Manager Agent |\n | mysql-im | 2273 | tcp, udp | MySQL Instance Manager |\n | mysql | 3306 | tcp, udp | MySQL |\n | mysql-proxy | 6446 | tcp, udp | MySQL Proxy |\n | mysqlx | 33060 | tcp | MySQL Database Extended Interface |\n +----------------+-------+----------+-----------------------------------+\n\nInstallation\n------------\n\n.. code-block:: shell\n\n $ pip install whatportis\n\nDatabase Sync\n-------------\n\nWhatportis uses a local JSON file (:code:`~/.whatportis_db.json`) to explore the list of ports. The first usage will create it for you, then you can use the :code:`--update` option to synchronize it :\n\n.. code-block:: shell\n\n $ whatportis --update\n Previous database will be updated, do you want to continue? [y/N]: y\n Downloading https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv...\n Populating database...\n 14145 ports imported.\n\nJSON output\n-----------\n\nYou can display the results as JSON, using the :code:`--json` option :\n\n.. code-block:: shell\n\n $ whatportis 5432 --json\n [\n {\n \"name\": \"postgresql\",\n \"port\": \"5432\",\n \"protocol\": \"tcp, udp\",\n \"description\": \"PostgreSQL Database\"\n }\n ]\n\nREST API\n--------\n\nWhatportis can also be started as a RESTful API server. This feature is not enabled by default, you must install an extra package :\n\n.. code-block:: shell\n\n $ pip install whatportis[server]\n $ whatportis --server localhost 8080\n * Serving Flask app \"whatportis.server\" (lazy loading)\n * Environment: prod\n * Debug mode: off\n * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)\n\nThe endpoints are :code:`/ports` for the whole list (can be long) and :code:`/ports/` to search a specific port :\n\n.. code-block:: shell\n\n $ curl http://127.0.0.1:8080/ports/3306\n {\"ports\":[{\"description\":\"MySQL\",\"name\":\"mysql\",\"port\":\"3306\",\"protocol\":\"tcp, udp\"}]}\n\n $ curl http://localhost:8080/ports/redis\n {\"ports\":[{\"description\":\"An advanced key-value cache and store\",\"name\":\"redis\",\"port\":\"6379\",\"protocol\":\"tcp\"}]}\n\nYou can use the :code:`?like` parameter to search a pattern.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ncrocfer/whatportis", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "whatportis", "package_url": "https://pypi.org/project/whatportis/", "platform": "", "project_url": "https://pypi.org/project/whatportis/", "project_urls": { "Homepage": "http://github.com/ncrocfer/whatportis" }, "release_url": "https://pypi.org/project/whatportis/0.8/", "requires_dist": [ "simplejson", "tinydb", "requests", "prettytable", "click", "pytest ; extra == 'dev'", "tox ; extra == 'dev'", "flask ; extra == 'server'" ], "requires_python": "", "summary": "A command to search port names and numbers", "version": "0.8" }, "last_serial": 5400532, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d89da387ea2383ef6832b0cbb3acaeb8", "sha256": "6f821a524ac0de374447a5e1572386d306fa388b309cf8e214bad10ae629264c" }, "downloads": -1, "filename": "whatportis-0.1.tar.gz", "has_sig": false, "md5_digest": "d89da387ea2383ef6832b0cbb3acaeb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 256845, "upload_time": "2016-01-26T23:06:45", "url": "https://files.pythonhosted.org/packages/61/49/8d433adece872ea43f25e5724112c036a14716ed2e40b7dcdb3351c06fd2/whatportis-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "67fedb5490cfa86b1e1aa964502dce2a", "sha256": "08735b4e1898cf64880ee2c08a5da74b3b81d65c44a67b44440fbe305012c8ec" }, "downloads": -1, "filename": "whatportis-0.2.tar.gz", "has_sig": false, "md5_digest": "67fedb5490cfa86b1e1aa964502dce2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 256884, "upload_time": "2016-01-26T23:17:47", "url": "https://files.pythonhosted.org/packages/3e/0d/0c8695af9e2be3a335d186b607b0f50faecd54a4c5a24ad0585c40c9fd33/whatportis-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "b4e5459b977436746f3dea64bcca4482", "sha256": "661920d3038127502c438189e0d4f068290de28360206bf4c20a66b0b6bd878b" }, "downloads": -1, "filename": "whatportis-0.3.tar.gz", "has_sig": false, "md5_digest": "b4e5459b977436746f3dea64bcca4482", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 258221, "upload_time": "2016-01-27T22:23:57", "url": "https://files.pythonhosted.org/packages/99/a4/d4e9c0c3bd7ca68be1bb311c18486e8a9621e9bc6cdec752fcbfbd82c01e/whatportis-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "cf825d8289f367936f2dfb8682b39bdf", "sha256": "b03793a9871125f8bc72996941fe40a6efaa78c5c640e3d68d599d24599c9eb9" }, "downloads": -1, "filename": "whatportis-0.4.tar.gz", "has_sig": false, "md5_digest": "cf825d8289f367936f2dfb8682b39bdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 258876, "upload_time": "2016-01-29T23:43:50", "url": "https://files.pythonhosted.org/packages/89/af/e41aa0e52ca2ecb028e33c5686ed3960cee129455bd8ea21084847401214/whatportis-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "b28f6c0edbd4fb67e6f5ba04dc0df8ec", "sha256": "39f2f66d6b6a408869272f4461933ca97833f1691e390844cc43a25fcef73d20" }, "downloads": -1, "filename": "whatportis-0.5.tar.gz", "has_sig": false, "md5_digest": "b28f6c0edbd4fb67e6f5ba04dc0df8ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 218371, "upload_time": "2016-02-08T08:03:59", "url": "https://files.pythonhosted.org/packages/de/ed/84d6d3d1f9a32733d7b39285ddb3a311f89f297dda1c80c814bccbc95b39/whatportis-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "41f3e5ddb19da1902cee6088bf6dd64a", "sha256": "d037a5b36629b0775527dea71a95feb99a5e619cca7626abe52edf6590c13602" }, "downloads": -1, "filename": "whatportis-0.6.tar.gz", "has_sig": false, "md5_digest": "41f3e5ddb19da1902cee6088bf6dd64a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 218447, "upload_time": "2016-02-08T23:52:40", "url": "https://files.pythonhosted.org/packages/83/d2/9f446452138d29048e06277559a013f8ec144c546b72520a609135163b77/whatportis-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "d0cd0449d9d392b4e51d9c7b10063109", "sha256": "1f55f7073568d576d89bb52a3d2c995cdeec126db21939ad6a9f1b0a31a21247" }, "downloads": -1, "filename": "whatportis-0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "d0cd0449d9d392b4e51d9c7b10063109", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7112, "upload_time": "2019-05-12T08:47:14", "url": "https://files.pythonhosted.org/packages/00/f1/2dddec8188d560ed7313b49b275a1a9e182965466a392d6b50b62f826f62/whatportis-0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6687e2f3029d2a20540f0ff843f91269", "sha256": "1ade96b4814bd8dd3aab9b86db009cca7210295adacd6b7af7447a363cb81505" }, "downloads": -1, "filename": "whatportis-0.7.tar.gz", "has_sig": false, "md5_digest": "6687e2f3029d2a20540f0ff843f91269", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17693, "upload_time": "2019-05-12T08:47:16", "url": "https://files.pythonhosted.org/packages/9f/59/f1b72dd60970564a90f9bec0dc6623ed3f35e4c85aaf11cac7a97be9d4b9/whatportis-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "01db0fad63d104a91c49276482a85dc0", "sha256": "cb280ec66334be207b6f6a54131b8670aa9b0a09b6746bf208e5f82524ee897c" }, "downloads": -1, "filename": "whatportis-0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "01db0fad63d104a91c49276482a85dc0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7458, "upload_time": "2019-06-14T13:21:11", "url": "https://files.pythonhosted.org/packages/65/e1/c10f9569a02aa388e76241ab063cebb1feacc02921fa71dc872c931d4078/whatportis-0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a18c23f6a6326321090471d6b6bdc534", "sha256": "ec4ab6c1cdcad224d3dd8814e24ba8beb33c85ddab446a1ca71fe73253ced108" }, "downloads": -1, "filename": "whatportis-0.8.tar.gz", "has_sig": false, "md5_digest": "a18c23f6a6326321090471d6b6bdc534", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18098, "upload_time": "2019-06-14T13:21:13", "url": "https://files.pythonhosted.org/packages/1c/ad/ae3d38df0fcd37af334ddff4502952597406876dabba9a99040025c41375/whatportis-0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "01db0fad63d104a91c49276482a85dc0", "sha256": "cb280ec66334be207b6f6a54131b8670aa9b0a09b6746bf208e5f82524ee897c" }, "downloads": -1, "filename": "whatportis-0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "01db0fad63d104a91c49276482a85dc0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7458, "upload_time": "2019-06-14T13:21:11", "url": "https://files.pythonhosted.org/packages/65/e1/c10f9569a02aa388e76241ab063cebb1feacc02921fa71dc872c931d4078/whatportis-0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a18c23f6a6326321090471d6b6bdc534", "sha256": "ec4ab6c1cdcad224d3dd8814e24ba8beb33c85ddab446a1ca71fe73253ced108" }, "downloads": -1, "filename": "whatportis-0.8.tar.gz", "has_sig": false, "md5_digest": "a18c23f6a6326321090471d6b6bdc534", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18098, "upload_time": "2019-06-14T13:21:13", "url": "https://files.pythonhosted.org/packages/1c/ad/ae3d38df0fcd37af334ddff4502952597406876dabba9a99040025c41375/whatportis-0.8.tar.gz" } ] }