{ "info": { "author": "Aalouane Soufiane", "author_email": "aalouane.s@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python :: 3", "Topic :: System :: Monitoring", "Topic :: System :: Networking", "Topic :: System :: Networking :: Firewalls", "Topic :: System :: Networking :: Monitoring" ], "description": "======================\nInmap\n======================\n\nIntroduction\n------------\n\ninmap is a python library which helps in using nmap port scanner. It allows to easilly manipulate nmap scan results and will be a perfect\ntool for systems administrators who want to automatize scanning task and reports.\n\nSupported Python Versions\n-------------------------\n\n* Python 3.4+\n\nInstalling nmap scanner\n-----------------------\n\ninmap requires the nmap scanner : ``_\n\n**Debian based system**:: \n\n sudo apt-get install nmap\n\n**Red Hat based system**::\n\n yum install nmap \n\n**ArchLinux**:: \n\n pacman -S nmap \n\n**OpenSuse**::\n\n yast2 -i nmap \n\n**Mac OS X**:: \n\n brew install nmap \n\nInstall inmap package\n---------------------\n\nIf you have `pip3 `_ on your system, you can simply install or upgrade the Python bindings::\n\n pip3 install inmap\n\nAlternately, you can download the source distribution from `PyPI `_ (e.g. inmap-1.2.4.tar.gz), unarchive it, and run::\n\n python setup.py install\n\nExample 0: Port Scanning\n------------------------\n\n.. code-block:: python\n\n import inmap\n\n scan = inmap.ScanController()\n host = inmap.HostModel()\n port = inmap.PortModel()\n\n scan.scan_ports(host='scantest.nmap.org', ports='0-200')\n scan.scan_ports(host='scantest.nmap.org', ports='22')\n # You can use the udp and|or pn option\n scan.scan_ports(host=\"scantest.nmap.org\", ports='80', udp = True, pn = True)\n\n # Fetch results\n # =============\n\n # for port infos the possible arguments are : ip_address - port - proto - state - service -version\n\n results = port.select()\n\n # Or\n results = port.select(state = 'open')\n results = port.select(port = 80)\n results = port.select(ip_address = \"10.10.10.5\")\n\n # and so on\n\n # Display results\n # ===============\n print(results)\n\n # if we have a single line of result\n prints(results['ip_address'])\n prints(results['port'])\n prints(results['proto'])\n prints(results['state'])\n prints(results['service'])\n prints(results['version']) # for version info see the next example\n\n # for many results\n print(results[0]['port'])\n print(results[1]['service'])\n\n # Or\n for result in results:\n print(result['ip_address'], ' - ', result['port'], ' - ', result['proto'], ' - ', result['state'], ' - ', result['service'])\n\nExample 1: Port Scanning with their version\n-------------------------------------------\n\n.. code-block:: python\n\n import inmap\n\n scan = inmap.ScanController()\n host = inmap.HostModel()\n port = inmap.PortModel()\n\n scan.scan_version_port(host=\"scantest.nmap.org\", ports='0-200')\n\n # or\n scan.scan_version_port(host=\"scantest.nmap.org\", ports='80')\n\n # You can use the udp and|or pn option\n scan.scan_version_port(host=\"scantest.nmap.org\", ports='80', udp = True, pn = True)\n\n # For fetch and displaying results, see the example 0\n\nExample 2: scan the 10 most ports\n---------------------------------\n\n.. code-block:: python\n\n import inmap\n\n scan = inmap.ScanController()\n host = inmap.HostModel()\n port = inmap.PortModel()\n\n scan.scan_most_ports(host='scantest.nmap.org')\n\n # Or scan the 20 most ports\n scan.scan_most_ports(host='10.10.10.3', number = 20)\n\n # You can use the udp and|or pn option\n scan.scan_most_ports(host='10.10.10.3', number = 20, udp = True, pn = True)\n\n # For fetch and displaying results, see the example 0\n\nExample 3: all information that we can have about this host : OS Detection, Port Scanning ...\n---------------------------------------------------------------------------------------------\n\n.. code-block:: python\n\n import inmap\n\n scan = inmap.ScanController()\n host = inmap.HostModel()\n port = inmap.PortModel()\n\n # Take more time and need root privilege\n scan.scan_all(host='scantest.nmap.org')\n # You can use the udp and|or pn option\n scan.scan_most_ports(host='10.10.10.3', udp = True, pn = True)\n\n # Or scan the 20 most ports\n scan.scan_most_ports(host='10.10.10.3', number = 20)\n\n # You can use the udp and|or pn option\n scan.scan_most_ports(host='10.10.10.3', number = 20, udp = True, pn = True)\n\n # Fetch results\n # =============\n\n # for host infos the possible arguments are :\n # ip_address, mac_address, hostname, os_family, os_cpe, os_details, device_type, info_host, info_cpe, info_os, network_distance\n results = host.select()\n\n # Or\n results = host.select(state = 'Up') # state : Up | Down\n results = host.select(ip_address = \"10.10.10.5\")\n results = host.select(mac_address = \"08:00:27:D3:EB:F1\")\n results = host.select(hostname = \"scantest.nmap.org\")\n\n # and so on, for port infos the possible arguments are : ip_address - port - proto - state - service -version\n\n # Display results\n # ===============\n print(results)\n\n # if we have a single line of result\n prints(results['ip_address'])\n prints(results['mac_address'])\n prints(results['hostname'])\n prints(results['state'])\n prints(results['os_details'])\n prints(results['network_distance']) # for version info see the next example\n\n # for many results\n print(results[0]['state'])\n print(results[1]['ip_address'])\n print(results[1]['network_distance'])\n print(results[1]['os_family'])\n\n # Or\n for result in results:\n print(result['ip_address'], ' - ', result['mac_address'], ' - ', result['hostname'], ' - ', result['os_family'])\n\n # For fetch and displaying port results, see the example 0\n\n\nUse The Source Luke!\n--------------------\n\nView source code online:\n\n+-----------+-------------------------------------------------------+\n| official: | https://github.com/aalouane/inmap |\n+-----------+-------------------------------------------------------+", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "nmap,portscanner,network,pentesting", "license": "gpl-3.0.txt", "maintainer": "", "maintainer_email": "", "name": "inmap", "package_url": "https://pypi.org/project/inmap/", "platform": "Operating System :: Linux", "project_url": "https://pypi.org/project/inmap/", "project_urls": null, "release_url": "https://pypi.org/project/inmap/1.2.7/", "requires_dist": null, "requires_python": "", "summary": "This is a python class to use nmap and access scan results from python3", "version": "1.2.7" }, "last_serial": 4998376, "releases": { "1.2.7": [ { "comment_text": "", "digests": { "md5": "26f68937b3caf33c46cc4cd09998c33e", "sha256": "87c97dd2ab0163e7ee87c9d73f3129dd4987e1b77e5e56f95d516c13d5dbcf26" }, "downloads": -1, "filename": "inmap-1.2.7.tar.gz", "has_sig": false, "md5_digest": "26f68937b3caf33c46cc4cd09998c33e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11115, "upload_time": "2019-03-28T15:41:34", "url": "https://files.pythonhosted.org/packages/38/8e/a796dd323358b34c002e390512236b521810b50c3d9806e5e231f938e9a5/inmap-1.2.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "26f68937b3caf33c46cc4cd09998c33e", "sha256": "87c97dd2ab0163e7ee87c9d73f3129dd4987e1b77e5e56f95d516c13d5dbcf26" }, "downloads": -1, "filename": "inmap-1.2.7.tar.gz", "has_sig": false, "md5_digest": "26f68937b3caf33c46cc4cd09998c33e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11115, "upload_time": "2019-03-28T15:41:34", "url": "https://files.pythonhosted.org/packages/38/8e/a796dd323358b34c002e390512236b521810b50c3d9806e5e231f938e9a5/inmap-1.2.7.tar.gz" } ] }