python-libnmap
==============
Code status
-----------
|preflight-check| |Coverage Status| |License|
Use cases
---------
libnmap is a python library enabling python developers to manipulate
nmap process and data.
libnmap is what you were looking for if you need to implement the
following:
- automate or schedule nmap scans on a regular basis
- manipulate nmap scans results to do reporting
- compare and diff nmap scans to generate graphs
- batch process scan reports
- …
The above uses cases will be easy to implement with the help of the
libnmap modules.
libnmap modules
---------------
The lib currently offers the following modules:
- **process**: enables you to launch nmap scans
- **parse**: enables you to parse nmap reports or scan results (only
XML so far) from a file, a string,…
- **report**: enables you to manipulate a parsed scan result and
de/serialize scan results in a json format
- **diff**: enables you to see what changed between two scans
- **common**: contains basic nmap objects like NmapHost and
NmapService. It is to note that each object can be "diff()ed" with
another similar object.
- **plugins**: enables you to support datastores for your scan results
directly in the "NmapReport" object. from report module:
- mongodb: insert/get/getAll/delete
- sqlalchemy: insert/get/getAll/delete
- aws s3: insert/get/getAll/delete (not supported for python3 since
boto is not supporting py3)
- csv: todo (easy to implement)
- elastic search: todo
Documentation
-------------
All the documentation is available on `read the
docs <https://libnmap.readthedocs.org>`__. This documentation contains
small code samples that you directly reuse.
Dependencies
------------
libnmap has by default no dependencies, except defusedxml if you need to
import untrusted XML scans data.
The only additional python modules you’ll have to install depends if you
wish to use libnmap to store reports on an exotic data store via
libnmap’s independents plugins.
Below the list of optional dependencies:
- `sqlalchemy <https://github.com/zzzeek/sqlalchemy>`__ (+the driver
ie:MySQL-python)
- `pymongo <https://github.com/mongodb/mongo-python-driver/>`__
- `boto <https://github.com/boto/boto>`__
Security
--------
If you are importing/parsing untrusted XML scan outputs with
python-libnmap, install defusedxml library:
.. code:: bash
ronald@brouette:~/dev$ pip install defusedxml
This will prevent you from being vulnerable to `XML External Entities
attacks <https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing>`__.
For more information, read the `official libnmap
documentation <https://libnmap.readthedocs.io/en/latest/parser.html#security-note-for-libnmap-parser>`__
This note relates to a cascaded CVE vulnerability from the python core
library XML ElementTree. Nevertheless, python-libnmap has been assigned
an `official
CVE <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1010017>`__
to track this issue.
This CVE is addressed from v0.7.2.
Python Support
--------------
The libnmap code is tested against the following python interpreters:
- Python 2.7
- Python 3.6
- Python 3.7
- Python 3.8
Install
-------
You can install libnmap via pip:
.. code:: bash
ronald@brouette:~$ pip install python-libnmap
or via git and dist utils (à l’ancienne):
.. code:: bash
ronald@brouette:~$ git clone https://github.com/savon-noir/python-libnmap.git
ronald@brouette:~$ cd python-libnmap
ronald@brouette:~$ python setup.py install
or via git and pip:
.. code:: bash
ronald@brouette:~$ git clone https://github.com/savon-noir/python-libnmap.git
ronald@brouette:~$ cd python-libnmap
ronald@brouette:~$ pip install .
Examples
--------
Some codes samples are available in the examples directory or in the
`documentation <https://libnmap.readthedocs.org>`__.
Among other example, you notice an sample code pushing nmap scan reports
in an ElasticSearch instance and allowing you to create fancy dashboards
in Kibana like the screenshot below:
.. figure:: https://github.com/savon-noir/python-libnmap/blob/es/examples/kibanalibnmap.png
:alt: Kibanane
Contributors
------------
Mike @bmx0r Boutillier for S3 and SQL-Alechemy plugins and for the
constructive critics. Thanks!
.. |preflight-check| image:: https://github.com/savon-noir/python-libnmap/workflows/Preflight%20Check/badge.svg
.. |Coverage Status| image:: https://coveralls.io/repos/github/savon-noir/python-libnmap/badge.svg?branch=master
:target: https://coveralls.io/github/savon-noir/python-libnmap?branch=master
.. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
:target: https://opensource.org/licenses/Apache-2.0
Raw data
{
"_id": null,
"home_page": "http://pypi.python.org/pypi/python-libnmap/",
"name": "python-libnmap",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Ronald Bister",
"author_email": "mini.pelle@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f0/b2/38e34576a715115e5bef9eff7d9989d48079c8138e5bb1d71bb8001df722/python-libnmap-0.7.3.tar.gz",
"platform": null,
"description": "python-libnmap\n==============\n\nCode status\n-----------\n\n|preflight-check| |Coverage Status| |License|\n\nUse cases\n---------\n\nlibnmap is a python library enabling python developers to manipulate\nnmap process and data.\n\nlibnmap is what you were looking for if you need to implement the\nfollowing:\n\n- automate or schedule nmap scans on a regular basis\n- manipulate nmap scans results to do reporting\n- compare and diff nmap scans to generate graphs\n- batch process scan reports\n- \u2026\n\nThe above uses cases will be easy to implement with the help of the\nlibnmap modules.\n\nlibnmap modules\n---------------\n\nThe lib currently offers the following modules:\n\n- **process**: enables you to launch nmap scans\n- **parse**: enables you to parse nmap reports or scan results (only\n XML so far) from a file, a string,\u2026\n- **report**: enables you to manipulate a parsed scan result and\n de/serialize scan results in a json format\n- **diff**: enables you to see what changed between two scans\n- **common**: contains basic nmap objects like NmapHost and\n NmapService. It is to note that each object can be \"diff()ed\" with\n another similar object.\n- **plugins**: enables you to support datastores for your scan results\n directly in the \"NmapReport\" object. from report module:\n\n - mongodb: insert/get/getAll/delete\n - sqlalchemy: insert/get/getAll/delete\n - aws s3: insert/get/getAll/delete (not supported for python3 since\n boto is not supporting py3)\n - csv: todo (easy to implement)\n - elastic search: todo\n\nDocumentation\n-------------\n\nAll the documentation is available on `read the\ndocs <https://libnmap.readthedocs.org>`__. This documentation contains\nsmall code samples that you directly reuse.\n\nDependencies\n------------\n\nlibnmap has by default no dependencies, except defusedxml if you need to\nimport untrusted XML scans data.\n\nThe only additional python modules you\u2019ll have to install depends if you\nwish to use libnmap to store reports on an exotic data store via\nlibnmap\u2019s independents plugins.\n\nBelow the list of optional dependencies:\n\n- `sqlalchemy <https://github.com/zzzeek/sqlalchemy>`__ (+the driver\n ie:MySQL-python)\n- `pymongo <https://github.com/mongodb/mongo-python-driver/>`__\n- `boto <https://github.com/boto/boto>`__\n\nSecurity\n--------\n\nIf you are importing/parsing untrusted XML scan outputs with\npython-libnmap, install defusedxml library:\n\n.. code:: bash\n\n ronald@brouette:~/dev$ pip install defusedxml\n\nThis will prevent you from being vulnerable to `XML External Entities\nattacks <https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing>`__.\n\nFor more information, read the `official libnmap\ndocumentation <https://libnmap.readthedocs.io/en/latest/parser.html#security-note-for-libnmap-parser>`__\n\nThis note relates to a cascaded CVE vulnerability from the python core\nlibrary XML ElementTree. Nevertheless, python-libnmap has been assigned\nan `official\nCVE <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1010017>`__\nto track this issue.\n\nThis CVE is addressed from v0.7.2.\n\nPython Support\n--------------\n\nThe libnmap code is tested against the following python interpreters:\n\n- Python 2.7\n- Python 3.6\n- Python 3.7\n- Python 3.8\n\nInstall\n-------\n\nYou can install libnmap via pip:\n\n.. code:: bash\n\n ronald@brouette:~$ pip install python-libnmap\n\nor via git and dist utils (\u00e0 l\u2019ancienne):\n\n.. code:: bash\n\n ronald@brouette:~$ git clone https://github.com/savon-noir/python-libnmap.git\n ronald@brouette:~$ cd python-libnmap\n ronald@brouette:~$ python setup.py install\n\nor via git and pip:\n\n.. code:: bash\n\n ronald@brouette:~$ git clone https://github.com/savon-noir/python-libnmap.git\n ronald@brouette:~$ cd python-libnmap\n ronald@brouette:~$ pip install .\n\nExamples\n--------\n\nSome codes samples are available in the examples directory or in the\n`documentation <https://libnmap.readthedocs.org>`__.\n\nAmong other example, you notice an sample code pushing nmap scan reports\nin an ElasticSearch instance and allowing you to create fancy dashboards\nin Kibana like the screenshot below:\n\n.. figure:: https://github.com/savon-noir/python-libnmap/blob/es/examples/kibanalibnmap.png\n :alt: Kibanane\n\nContributors\n------------\n\nMike @bmx0r Boutillier for S3 and SQL-Alechemy plugins and for the\nconstructive critics. Thanks!\n\n.. |preflight-check| image:: https://github.com/savon-noir/python-libnmap/workflows/Preflight%20Check/badge.svg\n.. |Coverage Status| image:: https://coveralls.io/repos/github/savon-noir/python-libnmap/badge.svg?branch=master\n :target: https://coveralls.io/github/savon-noir/python-libnmap?branch=master\n.. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg\n :target: https://opensource.org/licenses/Apache-2.0\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Python NMAP library enabling you to start async nmap tasks, parse and compare/diff scan results",
"version": "0.7.3",
"project_urls": {
"Homepage": "http://pypi.python.org/pypi/python-libnmap/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f0b238e34576a715115e5bef9eff7d9989d48079c8138e5bb1d71bb8001df722",
"md5": "29b94d528b35b2394e6af96c587d3920",
"sha256": "d03629256c2ee9ab37390c28d4c4c2ae9637cd0861dd8ab9e0f32779545936c0"
},
"downloads": -1,
"filename": "python-libnmap-0.7.3.tar.gz",
"has_sig": false,
"md5_digest": "29b94d528b35b2394e6af96c587d3920",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 39687,
"upload_time": "2022-09-01T21:39:29",
"upload_time_iso_8601": "2022-09-01T21:39:29.515294Z",
"url": "https://files.pythonhosted.org/packages/f0/b2/38e34576a715115e5bef9eff7d9989d48079c8138e5bb1d71bb8001df722/python-libnmap-0.7.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-09-01 21:39:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "python-libnmap"
}