{ "info": { "author": "Daniel Garcia Garcia (cr0hn)", "author_email": "cr0hn@cr0hn.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: POSIX :: BSD :: FreeBSD", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Security" ], "description": "What's this lib?\n================\n\nThis project is a Python library to connect and manage the OpenVAS servers using the OMP protocol. OpenVAS 6, 7, 8 and 9 are supported (7 and 8 versions are still experimental)\n\nAlso, you can parse and interpret OpenVas XML reports.\n\nWhy this lib?\n=============\n\nThere is an [official python library](https://pypi.python.org/pypi/openvas.omplib) for OpenVAS, but it doesn't work with OMPv4 based versions (OpenVAS 6).\n\nAlso, the official library has many unfixed bugs, and it's not capable to read and interpret the XML reports.\n\nLicense\n=======\n\nThis library is released under BSD Clause 3 license\n\nPython versions\n===============\n\nCurrently, this library only runs under Python 2.7 and above. Port to Python 3.x is not scheduled.\n\nBug, ports and new features\n===========================\n\nFeel free to port, patch or add any new feature to this library, and send us the pull request. We thank you in advance :)\n\nQuick start\n===========\n\nInstalling\n----------\n\nDownloading from code\n_____________________\n\nTo download the latest source code enter the following command:\n\n.. code-block:: bash\n\n git clone https://github.com/golismero/openvas_lib.git\n\nThen, install the library in your default Python installation run the following command:\n\n.. code-block:: bash\n\n python setup.py install\n\nInstall using pip\n_________________\n\n.. code-block:: bash\n\n pip install openvas_lib\n\nManage OpenVas server\n---------------------\n\nConnect to the server\n_____________________\n\n\n.. code-block:: python\n\n from openvas_lib import VulnscanManager, VulnscanException\n\n try:\n scanner = VulnscanManager(HOST, USER, PASSWORD, PORT, TIMEOUT)\n except VulnscanException as e:\n print(\"Error:\")\n print(e)\n\nLaunch a simple scan\n____________________\n\n.. code-block:: python\n\n from openvas_lib import VulnscanManager, VulnscanException\n\n scanner = VulnscanManager(HOST, USER, PASSWORD, PORT, TIMEOUT)\n scan_id, target_id = scanner.launch_scan(target = \"127.0.0.1\", # Target to scan\n profile = \"Full and fast\")\n\nLaunch advanced scan\n____________________\n\nThe library supports callbacks. They will be run every 10 seconds and report the status of the scan (\"callback_progress\") or the end of the scan (\"callback_end\").\n\n.. code-block:: python\n\n from threading import Semaphore\n from functools import partial\n\n from openvas_lib import VulnscanManager, VulnscanException\n\n def my_print_status(i):\n print(str(i))\n\n def my_launch_scanner():\n\n sem = Semaphore(0)\n\n # Configure\n manager = VulnscanManager(\"localhost\", \"admin\", \"admin\")\n\n # Launch\n manager.launch_scan(target,\n profile = \"empty\",\n callback_end = partial(lambda x: x.release(), sem),\n callback_progress = my_print_status)\n\n # Wait\n Sem.acquire()\n\n # Finished scan\n print(\"finished\")\n\nRunning it:\n\n.. code-block:: python\n\n >>> my_launch_scanner() # It can take some time\n 0\n 10\n 39\n 60\n 90\n finished\n\nGet results of scan\n___________________\n\n.. code-block:: python\n\n from __future__ import print_function\n from openvas_lib import VulnscanManager, VulnscanException\n\n scanner = VulnscanManager(HOST, USER, PASSWORD, PORT, TIMEOUT)\n openvas_results = scanner.get_results(SCAN_ID)\n\nDelete scan\n___________\n\n.. code-block:: python\n\n from __future__ import print_function\n from openvas_lib import VulnscanManager, VulnscanException\n\n scanner = VulnscanManager(HOST, USER, PASSWORD, PORT, TIMEOUT)\n scanner.delete_scan(SCAN_ID)\n\nDelete target\n_____________\n\n.. code-block:: python\n\n from __future__ import print_function\n from openvas_lib import VulnscanManager, VulnscanException\n\n scanner = VulnscanManager(HOST, USER, PASSWORD, PORT, TIMEOUT)\n scanner.delete_target(TARGET_ID)\n\n\nParse OpenVas XML report\n------------------------\n\nYou can use examples reports, available in test/ folder, as \"xml\" extension. This reports was made using Metasploitable\nLinux distribution.\n\n.. code-block:: pycon\n\n >>> from __future__ import print_function\n >>> from openvas_lib import report_parser\n >>> results = report_parser(\"tests/metasploitable_all.xml\")\n >>> print(results)\n [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]\n # get properties from a vuln with more info\n >>> r = None\n >>> for x in results:\n if x.id == \"07cdd3dc-9f5b-4a75-a173-f7ca50bfb4f3\":\n r = x\n >>> r.id\n '07cdd3dc-9f5b-4a75-a173-f7ca50bfb4f3'\n >>> r.host\n '10.211.55.35'\n >>> r.raw_description\n \"\\n Summary:\\n The host is running MySQL and is prone to Denial Of Service\\n vulnerability.\\n\\n Vulnerability Insight:\\n The flaw is due to an error when processing the 'ALTER DATABASE' statement and\\n can be exploited to corrupt the MySQL data directory using the '#mysql50#'\\n prefix followed by a '.' or '..'.\\n\\n NOTE: Successful exploitation requires 'ALTER' privileges on a database.\\n Impact:\\n Successful exploitation could allow an attacker to cause a Denial of Service.\\n Impact Level: Application\\n\\n Affected Software/OS:\\n MySQL version priot to 5.1.48 on all running platform.\\n\\n Solution:\\n Upgrade to MySQL version 5.1.48\\n For updates refer to http://dev.mysql.com/downloads\\n\"\n >>> print(r.raw_description)\n Summary:\n The host is running MySQL and is prone to Denial Of Service\n vulnerability.\n\n Vulnerability Insight:\n The flaw is due to an error when processing the 'ALTER DATABASE' statement and\n can be exploited to corrupt the MySQL data directory using the '#mysql50#'\n prefix followed by a '.' or '..'.\n\n NOTE: Successful exploitation requires 'ALTER' privileges on a database.\n Impact:\n Successful exploitation could allow an attacker to cause a Denial of Service.\n Impact Level: Application\n\n Affected Software/OS:\n MySQL version priot to 5.1.48 on all running platform.\n\n Solution:\n Upgrade to MySQL version 5.1.48\n For updates refer to http://dev.mysql.com/downloads\n >>> r.summary\n 'The host is running MySQL and is prone to Denial Of Service vulnerability.'\n >>> r.vulnerability_insight\n \"The flaw is due to an error when processing the 'ALTER DATABASE' statement and can be exploited to corrupt the MySQL data directory using the '#mysql50#' prefix followed by a '.' or '..'. NOTE: Successful exploitation requires 'ALTER' privileges on a database.\"\n >>> r.impact\n 'Successful exploitation could allow an attacker to cause a Denial of Service. Impact Level: Application'\n >>> r.affected_software\n 'MySQL version priot to 5.1.48 on all running platform.'\n >>> r.solution\n 'Upgrade to MySQL version 5.1.48 For updates refer to http://dev.mysql.com/downloads'\n >>> r.threat\n 'Medium'\n >>> r.port.number\n 3306\n >>> r.port.proto\n 'tcp'\n >>> r.port.port_name\n 'mysql'", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/golismero/openvas_lib/zipball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.golismero.com/", "keywords": "", "license": "BSD3", "maintainer": "", "maintainer_email": "", "name": "openvas-lib", "package_url": "https://pypi.org/project/openvas-lib/", "platform": "", "project_url": "https://pypi.org/project/openvas-lib/", "project_urls": { "Download": "https://github.com/golismero/openvas_lib/zipball/master", "Homepage": "http://www.golismero.com/" }, "release_url": "https://pypi.org/project/openvas-lib/1.1.8/", "requires_dist": null, "requires_python": "", "summary": "OpenVAS Manager for OpenVAS 6 to 8 and XML report parser", "version": "1.1.8" }, "last_serial": 5455942, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "6a77456172d03a4cdb6514b0d7f52bc9", "sha256": "3c82b8cee903075133cdf8935c3356a25fc80601c4e6bb3e4a2cf1bd83567239" }, "downloads": -1, "filename": "openvas_lib-1.0.tar.gz", "has_sig": false, "md5_digest": "6a77456172d03a4cdb6514b0d7f52bc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19682, "upload_time": "2014-08-31T22:38:06", "url": "https://files.pythonhosted.org/packages/37/78/b4e3126de79ed3a981fd7e68cb36d94764e99b339470c25f2cd740f2df5d/openvas_lib-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "eb30df11f4405b34ec0124e3da7822fa", "sha256": "50b15b64968da8f06f841c609c615ad93adfe05ff93ae489dc03b94976c8a490" }, "downloads": -1, "filename": "openvas_lib-1.1.tar.gz", "has_sig": false, "md5_digest": "eb30df11f4405b34ec0124e3da7822fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19757, "upload_time": "2016-07-04T15:16:24", "url": "https://files.pythonhosted.org/packages/13/5b/c3c007ff53fc74a769776bb8c48eed0339f92e95bf30f666c459039ffdd7/openvas_lib-1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "6997b3c284d2c86656fcc6bfc5a6a07f", "sha256": "e66777de993082c61941c98d29ea0ec43d8ff6aac1c2a768544ef9bf465328b7" }, "downloads": -1, "filename": "openvas_lib-1.1.2.tar.gz", "has_sig": false, "md5_digest": "6997b3c284d2c86656fcc6bfc5a6a07f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19615, "upload_time": "2016-07-12T18:23:10", "url": "https://files.pythonhosted.org/packages/37/50/8b9c1079ce1b6b305f4f6f7b561140094d44168728358245c17eb8d74b45/openvas_lib-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "f846482fddc87b4890863ff307cd6827", "sha256": "e4ac9017a88f785a04a6c9616140d37ce4d0ba2df2cc7a47a6afa01bd3f5a540" }, "downloads": -1, "filename": "openvas_lib-1.1.3.tar.gz", "has_sig": false, "md5_digest": "f846482fddc87b4890863ff307cd6827", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21470, "upload_time": "2017-04-20T18:42:30", "url": "https://files.pythonhosted.org/packages/e0/4e/cec6ae890664a9ac5538231403ca55bb928466a24cd6776994e22fe8003c/openvas_lib-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "bb1c525ff7a31bbe779e2e92376b22db", "sha256": "357e458dbb65014be72fa7600d6a7804a414d73e59b9fa01038d93359ca23396" }, "downloads": -1, "filename": "openvas_lib-1.1.4.tar.gz", "has_sig": false, "md5_digest": "bb1c525ff7a31bbe779e2e92376b22db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5193, "upload_time": "2018-07-02T16:43:58", "url": "https://files.pythonhosted.org/packages/9f/30/0a94eec0394f5fd0455803e8ec253145a2e9bf1ca4cd5738a3516b39a012/openvas_lib-1.1.4.tar.gz" } ], "1.1.5": [ { "comment_text": "", "digests": { "md5": "4ca43ce71c843e9201ead5e2850018bf", "sha256": "bfd0a15e95580b834d3144dcf857c392482123fb3868135044ebf113f466679e" }, "downloads": -1, "filename": "openvas_lib-1.1.5.tar.gz", "has_sig": false, "md5_digest": "4ca43ce71c843e9201ead5e2850018bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28310, "upload_time": "2018-07-03T10:41:28", "url": "https://files.pythonhosted.org/packages/6f/db/64f2c8177f6629f12628f2cfe23b9765f2024d8a47f9249e74b565c396d4/openvas_lib-1.1.5.tar.gz" } ], "1.1.6": [ { "comment_text": "", "digests": { "md5": "2167f39c3c137e87aa4eab917f8f9a3e", "sha256": "56d73b8407a47684062d470c022f4aa66c71ca345c546999becbac3b17d57c49" }, "downloads": -1, "filename": "openvas_lib-1.1.6.tar.gz", "has_sig": false, "md5_digest": "2167f39c3c137e87aa4eab917f8f9a3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29969, "upload_time": "2019-01-16T09:58:21", "url": "https://files.pythonhosted.org/packages/90/b2/c12402158de3837bc6a2857a2b9d7189bd346ba9e65cd95367eb9b497428/openvas_lib-1.1.6.tar.gz" } ], "1.1.7": [ { "comment_text": "", "digests": { "md5": "e200c7208934ab35e5d68a447fa2ed97", "sha256": "d3ad75c8b158a811cdac4011beeac940a56f3765e28b3c0ca225d5a7559aa5f5" }, "downloads": -1, "filename": "openvas_lib-1.1.7.tar.gz", "has_sig": false, "md5_digest": "e200c7208934ab35e5d68a447fa2ed97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28676, "upload_time": "2019-03-12T15:28:30", "url": "https://files.pythonhosted.org/packages/31/03/4b80e8455e545d71be21ce915f13ab8d9a26d0b1cac7283445d50aea7add/openvas_lib-1.1.7.tar.gz" } ], "1.1.8": [ { "comment_text": "", "digests": { "md5": "96c03440c4b3091bb6cbffe8acbd070c", "sha256": "8b2d4c3151b7b358535a0bdd5548eca8b73661178c136f61334da36171e30fd7" }, "downloads": -1, "filename": "openvas_lib-1.1.8.tar.gz", "has_sig": false, "md5_digest": "96c03440c4b3091bb6cbffe8acbd070c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30684, "upload_time": "2019-06-27T08:57:31", "url": "https://files.pythonhosted.org/packages/9a/f1/b169dfb62493b8dd2055858a300dcdf2564fd41901ffa02236b7a323114b/openvas_lib-1.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "96c03440c4b3091bb6cbffe8acbd070c", "sha256": "8b2d4c3151b7b358535a0bdd5548eca8b73661178c136f61334da36171e30fd7" }, "downloads": -1, "filename": "openvas_lib-1.1.8.tar.gz", "has_sig": false, "md5_digest": "96c03440c4b3091bb6cbffe8acbd070c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30684, "upload_time": "2019-06-27T08:57:31", "url": "https://files.pythonhosted.org/packages/9a/f1/b169dfb62493b8dd2055858a300dcdf2564fd41901ffa02236b7a323114b/openvas_lib-1.1.8.tar.gz" } ] }