{ "info": { "author": "Lukasz Banasiak", "author_email": "lukas.banasiak@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Security", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "====================\npython-nessus-client\n====================\n\nPython Client for `Nessus 5.0 REST API `_.\n\nNessus is a proprietary comprehensive vulnerability scanner which is developed by Tenable Network Security.\nIt is free of charge for personal use in a non-enterprise environment.\n\nDocumentation\n-------------\n\nDocumentation is available online at http://python-nessus-client.readthedocs.org and in the ``docs``\ndirectory.\n\nInstallation\n------------\n\nInstall using pip\n\n.. code:: bash\n\n pip install python-nessus-client\n\nExamples\n--------\n\nREST resources are translated to methods.\n\nFor example:\n\n+----------------------------------------------+-----------------------------------------------------+\n| Resource | Method |\n+==============================================+=====================================================+\n| ``/users/list`` | ``object.users.list()`` |\n+----------------------------------------------+-----------------------------------------------------+\n| ``/server/securesettings/&proxy%5Fport=8888``| ``object.server.securesettings(proxy_port='8888')`` |\n+----------------------------------------------+-----------------------------------------------------+\n\nand so on...\n\nTo get users list ``https://nessus.example.com:8834/users/list`` we call ``list()`` method on ``Users`` class\n\n.. code:: python\n\n >>> from nessus import API\n >>> nessus = API('https://127.0.0.1:8834', username='user', password='pass')\n >>> print nessus.users.list()\n [\n {\n \"admin\": \"TRUE\",\n \"name\": \"test\",\n \"lastlogin\": 1416492416\n }\n ]\n\nTo get server security settings list ``https://nessus.example.com:8834/server/securesettings/list``\nwe call ``securesettings()`` method on ``Server`` class\n\n.. code:: python\n\n >>> from nessus import API\n >>> nessus = API('https://127.0.0.1:8834', username='user', password='pass')\n >>> print nessus.server.securesettings()\n {\n \"proxysettings\": {\n \"proxy_password\": null,\n \"proxy_port\": \"8080\",\n \"custom_host\": null,\n \"proxy_username\": null,\n \"user_agent\": null,\n \"proxy\": \"10.0.0.1\"\n }\n }\n\nTo set server security settings ``https://nessus.example.com:8834/server/securesettings``\nwe use the same ``securesettings()`` method on ``Server`` class but we pass\nas a argument settings to set up.\n\n.. code:: python\n\n >>> from nessus import API\n >>> nessus = API('https://127.0.0.1:8834', username='user', password='pass')\n >>> nessus.server.securesettings(proxy_port='8081')\n >>> print nessus.server.securesettings()\n {\n \"proxysettings\": {\n \"proxy_password\": null,\n \"proxy_port\": \"8081\",\n \"custom_host\": null,\n \"proxy_username\": null,\n \"user_agent\": null,\n \"proxy\": \"10.0.0.1\"\n }\n }\n\nMore examples can be found in the following subsections and in class documentation.\n\nAuthenticating a user\n^^^^^^^^^^^^^^^^^^^^^\n\nLogin to Nessus server\n\n.. code:: python\n\n >>> from nessus import API\n >>> nessus = API('https://127.0.0.1:8834', username='user', password='pass')\n\nResponse is Python structure\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWe can acts like we work with dict.\n\nGet configuration value\n\n.. code:: python\n\n >>> print nessus.server.securesettings()['proxysettings']['proxy_port']\n 8080\n\nGet name from second item in report list get list of hosts contained in a specified report\n\n.. code:: python\n\n >>> second_host = nessus.report.list()[1]['name']\n >>> print nessus.report.hosts(second_host)\n {\n \"scanprogresscurrent\": \"0\",\n \"scanprogresstotal\": \"100\",\n (...)\n }\n\nMake output more readable\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n # before\n >>> print nessus.server.securesettings()\n {u'proxysettings': {u'proxy_password': None, u'proxy_port': u'8080', (...)\n # after\n >>> import json\n >>> data = nessus.server.securesettings()\n >>> json.dumps(data, indent=2)\n {\n \"proxysettings\": {\n \"proxy_password\": null,\n \"proxy_port\": \"8080\",\n \"custom_host\": null,\n \"proxy_username\": null,\n \"user_agent\": null,\n \"proxy\": \"10.0.0.1\"\n }\n }\n\nCheck if report has audit trail\n\n.. code:: python\n\n >>> nessus.report.has_audit_trail(name)\n True\n >>> if nessus.report.has_audit_trail(name):\n >>> print 'Report {} has audit trail'.format(name)\n Report 95c309f8-2578-fd3e-9e4d-a8aa6d6511e8b617b5a088c93309 has audit trail\n\nCreate new scan\n\n.. code:: python\n\n # make list with hosts\n >>> target = ['localhost', 'example.com']\n >>> nessus.scan.new(target, 'test', '-37')", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lukaszbanasiak/python-nessus-client", "keywords": "nessus api rest client", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "python-nessus-client", "package_url": "https://pypi.org/project/python-nessus-client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-nessus-client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/lukaszbanasiak/python-nessus-client" }, "release_url": "https://pypi.org/project/python-nessus-client/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Python Client for Nessus REST API", "version": "0.1.1" }, "last_serial": 1426921, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b38911591df6be7cbb1cde2dbb62a4f6", "sha256": "7b928bb5cbe655519cd1b23fe7ef6e8b2813369f358b85889984c9712f2f5b9b" }, "downloads": -1, "filename": "python-nessus-client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b38911591df6be7cbb1cde2dbb62a4f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19537, "upload_time": "2014-11-21T12:43:57", "url": "https://files.pythonhosted.org/packages/48/dc/4e8b7d6647a3d50303f8274d1f271fe4d1c53b2c0365d0de05cd3856b160/python-nessus-client-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5237ebfd359a7bcc9f186f84d26f20e4", "sha256": "8556818e31fd88bb4eab6c14513ce6ba865df19a2095e622b5c1769b0fac1f05" }, "downloads": -1, "filename": "python-nessus-client-0.1.1.zip", "has_sig": false, "md5_digest": "5237ebfd359a7bcc9f186f84d26f20e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28124, "upload_time": "2015-02-17T14:55:36", "url": "https://files.pythonhosted.org/packages/e6/90/eae0403348cbf4f9efc9998b0ed397fc05ea4bbe38ed3e81e2fac9181579/python-nessus-client-0.1.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5237ebfd359a7bcc9f186f84d26f20e4", "sha256": "8556818e31fd88bb4eab6c14513ce6ba865df19a2095e622b5c1769b0fac1f05" }, "downloads": -1, "filename": "python-nessus-client-0.1.1.zip", "has_sig": false, "md5_digest": "5237ebfd359a7bcc9f186f84d26f20e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28124, "upload_time": "2015-02-17T14:55:36", "url": "https://files.pythonhosted.org/packages/e6/90/eae0403348cbf4f9efc9998b0ed397fc05ea4bbe38ed3e81e2fac9181579/python-nessus-client-0.1.1.zip" } ] }