{ "info": { "author": "Shane Scott", "author_email": "sscott@gvit.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6" ], "description": "PyDradis\n=======\n

\nDradis API Python Wrapper 0.2.3\n

\n\nUpdated by GoVanguard. Originally created by Novacoast.\n\nLicense\n-\nPydradis3 is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nPydradis3 is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with Pydradis. If not, see .\n\nUsage Example\n-\nThis is a wrapper for the [Dradis Pro API](http://securityroots.com/dradispro/support/guides/rest_api/index.html)\n\nInstall by either pulling from this repo or using:\n```\npip install pydradis3\n```\nSetup:\n\n```python\nfrom pydradis3 import Pydradis3\n\ndebug = True #Do you want to see debug info?\nverify = True #Force ssl certificate verification?\npd = Pydradis3(\"\",\"\",debug,verify)\n\n```\n\nAll endpoints have 6 functions that work roughly the same:\n\n- *Get:* Given an element id, returns the element info.\n\n- *Get Lists:* Returns list of Clients, Projects, etc..\n\n- *Create:* Creates elements and returns their id.\n\n- *Update:* Updates elements and returns their id.\n\n- *Delete:* Deletes elements and returns True if successful.\n\n- *Find:* Given keyword(s), return a list of possible elements.\n\n

Client Endpoint

\n\n- get_clientlist()\n```python\n>>> pd.get_clientlist()\n[[u'NASA', 2], [u'ACME Inc.', 5]]\n```\n\n- get_client(int client_id)\n```python\n>>> pd.get_client(2)\n{u'client_since': u'2016-08-29', u'name': u'NASA', u'created_at': u'2016-08-29T05:43:47.000Z', u'updated_at': u'2016-08-29T05:44:30.000Z', u'id': 3, u'projects': [{u'id': 6, u'name': u'Internal Pentest #1'}]}\n```\n\n- create_client(string client_name)\n```python\n>>> pd.create_client(\"Wayne Industries\")\n42\n```\n\n- update_client(string client_name)\n```python\n>>> pd.update_client(\"Wayne Corp.\")\n42\n```\n\n- find_client(string client_name)\n```python\n>>> pd.find_client(\"Wayne Corp.\")\n42\n```\n\n- delete_client(int client_id)\n```python\n>>> pd.delete_client(42)\nTrue\n```\n\n

Project Endpoint

\n\n- get_projectlist()\n```python\n>>> pd.get_projectlist()\n[[u'Project X', 10],[u'WikiTesting', 7], [u'Project B-25', 1], [u'Internal Pentest', 2]]\n```\n\n- get_project(int project_id)\n```python\n>>> pd.get_project(10)\n{u'owners': [{u'email': u'pedro@example.com'}], u'name': u'Project X', u'created_at': u'2016-04-20T23:49:40.000Z', u'updated_at': u'2016-06-29T16:10:06.000Z', u'authors': [{u'email': u'pedro@example.com'}], u'id': 10}\n```\n\n- create_project(string project_name, int client_id=None)\n```python\n>>> pd.create_project(\"Project T\",2)\n26\n```\n\n- update_project(int project_id, string project_name, int new_client_id)\n```python\n>>> pd.update_project(26,\"Project T1\",42)\n26\n```\n\n- find_project(string project_name)\n```python\n>>> pd.find_project(\"Project T1\")\n26\n```\n\n- delete_project(int project_id)\n```python\n>>> pd.delete_project(10)\nTrue\n```\n\n

Node Endpoint

\n\n- get_nodelist(int project_id)\n```python\n>>> pd.get_nodelist(1)\n[[u'Dradis Professional Edition', 1], [u'Welcome', 2], [u'Getting Help', 3], [u\"What's next?\", 4]]\n```\n\n- get_node(int project_id, int node_id)\n```python\n>>> pd.get_node(1,1)\n{u'type_id': 0, u'created_at': u'2012-06-09T10:25:57.000Z', u'updated_at': u'2014-03-12T14:19:37.000Z', u'label': u'Dradis Professional Edition', u'parent_id': None, u'notes': [{u'fields': {u'Title': u'Test Note #1'}, u'category_id': 6, u'text': u'#[Title]#\\nTest Note #1', u'id': 1, u'title': u'Test Note #1'}], u'position': 0, u'evidence': [], u'id': 1}\n```\n\n- create_node(int project_id, string label, int type_id=0, int parent_id=None, position=1)\n```python\n>>> pd.create_node(1,\"Testing #2\",0,None,1)\n590\n```\n\n- update_node(int project_id, int node_id, string label=None, int type_id=None, int parent_id=None, position=None)\n```python\n>>> pd.update_node(1,590,\"Testing #2 - Mod\",0,1,0)\n590\n```\n\n- find_node(int project_id, string nodepath)\n```python\n>>> pd.find_node(1,\"Dradis Professional Edition/Testing #2 - Mod\")\n590\n```\n\n\n- delete_node(int project_id, int node_id)\n```python\n>>> pd.delete_node(1,590)\nTrue\n```\n\n

Issues Endpoint

\n\n- get_issuelist(int project_id)\n```python\n>>> pd.get_issuelist(1)\n[[u'Firewall Issue', 414], [u'Problem #1', 413]]\n```\n\n- get_issue(int project_id, int issue_id)\n```python\n>>> pd.get_issue(1,414)\n{u'title': u'Firewall Issue', u'fields': {u'Description': u'The firewall is turned off', u'Title': u'Firewall Issue'}, u'created_at': u'2016-06-30T16:07:10.000Z', u'updated_at': u'2016-06-30T16:07:10.000Z', u'text': u'#[Title]#\\r\\nFirewall Issue\\r\\n\\r\\n#[Description]#\\r\\nThe firewall is turned off\\r\\n\\r\\n', u'id': 414}\n```\n\n- create_issue(int project_id, string title, string text, string[] tags=[])\n```python\n>>> pd.create_issue(1,\"Main router issue\", \"Main router uses default admin & password\", [\"Internal\",\"Networking\"])\n415\n```\n\n- update_issue(int project_id, int issue_id, string title, string text, string[] tags=[])\n```python\n>>> pd.update_issue(1,415,\"Main router credentials\", \"Admin=root and password=abc123 \", [\"Internal\",\"Networking\",\"Tag A\"])\n415\n```\n\n- find_issue(int project_id, string[] keywords)\n```python\n#Use with single keyword\n>>> pd.find_issue(1,\"router\")\n[[u'Main router credentials', 415]]\n#Use with keyword list\n>>> pd.find_issue(1,[\"issue\",\"problem\"])\n[[u'Firewall Issue', 414], [u'Problem #1', 413]]\n```\n\n- delete_issue(int project_id, int issue_id)\n```python\n>>> pd.delete_issue(414)\nTrue\n```\n\n\n

Evidence Endpoint

\n\n- get_evidencelist(int project_id, int node_id)\n```python\n>>> pd.get_evidencelist(1,1)\n[{u'content': u'#[Title]#\\r\\nFingerprints\\r\\n\\r\\n#[Description]#\\r\\nFoo Foo\\r\\n\\r\\n#[Tag B]#\\r\\n', u'fields': {u'Tag B': u'', u'Label': u'Dradis Professional Edition', u'Description': u'Foo Foo', u'Title': u'Fingerprints'}, u'issue': {u'url': u'https://dradis.waynecorp.at/pro/api/issues/415', u'id': 415, u'title': u'Main router credentials'}, u'id': 47}]\n```\n\n- get_evidence(int project_id, int node_id, int evidence_id)\n```python\n>>> pd.get_evidence(1,1,47)\n{u'content': u'#[Title]#\\r\\nFingerprints\\r\\n\\r\\n#[Description]#\\r\\nFoo Foo\\r\\n\\r\\n#[Tag B]#\\r\\n', u'fields': {u'Tag B': u'', u'Label': u'Dradis Professional Edition', u'Description': u'Foo Foo', u'Title': u'Fingerprints'}, u'issue': {u'url': u'https://dradis.waynecorp.at/pro/api/issues/415', u'id': 415, u'title': u'Main router credentials'}, u'id': 47}\n```\n\n- create_evidence(int project_id, int node_id, int issue_id, string title, string text, string[] tags=[])\n```python\n>>> pd.create_evidence(1,1,415,\"Some Evidence\", \"More Info\",[\"Tag A\"])\n48\n```\n\n- update_evidence(int project_id, int node_id, int issue_id, int evidence_id, string title, string text, string[] tags=[])\n```python\n>>> pd.update_evidence(1,1,415,46,\"Some Evidence #2\", \"More Info\",[\"Internal\"])\n46\n```\n\n- find_evidence(int project_id, node_id, string[] keywords)\n```python\n>>> pd.find_evidence(1,1,[\"evidence #2\"])\n[{u'content': u'#[Title]#\\r\\nSome Evidence #2\\r\\n\\r\\n#[Description]#\\r\\nMore Info\\r\\n\\r\\n#[Internal]#\\r\\n', u'fields': {u'Internal': u'', u'Label': u'Dradis Professional Edition', u'Description': u'More Info', u'Title': u'Some Evidence #2'}, u'issue': {u'url': u'https://dradis.waynecorp.at/pro/api/issues/415', u'id': 415, u'title': u'Main router credentials'}, u'id': 46}]\n```\n\n- delete_evidence(int project_id, node_id, evidence_id)\n```python\n>>> pd.delete_evidence(1,1,46)\nTrue\n```\n\n

Note Endpoint

\n\n- get_notelist(int project_id, int node_id)\n```python\n>>> pd.get_notelist(1,1)\n[[u'Use the tree on the left to browse through the items in this project.', 1], [u'Ready to try the new interface?', 2]]\n```\n\n- get_note(int project_id, int node_id, int note_id)\n```python\npd.get_note(1,1,1)\n{u'fields': {u'Title': u'Use the tree on the left to browse through the items in this project.'}, u'category_id': 6, u'text': u'#[Title]#\\nUse the tree on the left to browse through the items in this project.', u'id': 1, u'title': u'Use the tree on the left to browse through the items in this project.'}\n```\n\n- create_note(int project_id, int node_id, string title, string text, string[] tags=[], category=0)\n```python\n>>>pd.create_note(1,1,\"Possible Hosts\", \"foo.com, foo.org and foo.net\",[\"External\",\"OSINT\"],0)\n416\n```\n\n- update_note(int project_id, int node_id, int note_id, string title, string text, string[] tags=[], category=1)\n```python\n>>> pd.update_note(1,1,416,\" Possible Vulnerable Hosts\", \"foo.com, foo.org, foo.net, and foo.io\",[\"External\",\"OSINT\"],1)\n416\n```\n\n- find_note(int project_id, int node_id, string[] keywords)\n```python\n>>> pd.find_note(1,1,[\"foo.org\",\"foo.net\"])\n[[u'Vulnerable Host', 416]\n```\n\n- delete_note(int project_id, int node_id, int note_id)\n```python\n>>> pd.delete_note(1,1,416)\nTrue\n```\n\n

Attachment Endpoint

\n\n- get_attachmentlist(int project_id, int node_id)\n```python\n>>> pd.get_attachmentlist(1,358)\n[[u'screenshot.png', u'/pro/nodes/358/attachments/screenshot.png'], [u'test.py', u'/pro/nodes/358/attachments/test.py']]\n```\n\n- get_attachment(int projectid, int nodeid, string attachment_name, string output_name=None)\n```python\n>>> pd.get_attachment(1,358,\"screenshot.png\",\"downloads/screenshot01.png\")\nTrue #This means it succesfully downloaded file to downloads/screenshot01.png\n```\n\n- pd.post_attachment(int projectid, int nodeid, string attachment_filename)\n```python\n>>> pd.post_attachment(1,358,\"important.txt\")\n[u'important.txt', u'/pro/nodes/358/attachments/important.txt']\n```\n\n- pd.rename_attachment(int projectid, int nodeid, string attachment_name, string new_attachment_name)\n```python\n>>> pd.rename_attachment(1,358,\"important.txt\",\"super_important.txt\")\n[u'super_important.txt', u'/pro/nodes/358/attachments/super_important.txt']\n```\n\n- pd.delete_attachment(int projectid, int nodeid, string attachment_name)\n```python\n>>> pd.delete_attachment(1,358,\"important.txt\")\nTrue\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/GoVanguard/pydradis3", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pydradis3", "package_url": "https://pypi.org/project/pydradis3/", "platform": "", "project_url": "https://pypi.org/project/pydradis3/", "project_urls": { "Homepage": "https://github.com/GoVanguard/pydradis3" }, "release_url": "https://pypi.org/project/pydradis3/0.2.3/", "requires_dist": null, "requires_python": "", "summary": "Update of pydradis for Python3 plus some optimizations", "version": "0.2.3" }, "last_serial": 4169055, "releases": { "0.2.2": [ { "comment_text": "", "digests": { "md5": "c0d421cca63c02173f48207cf55ceb63", "sha256": "44272c00d29ca83eefafc8d01a6055df8fc90adeb255f10dcb09a5bf283eed9d" }, "downloads": -1, "filename": "pydradis3-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c0d421cca63c02173f48207cf55ceb63", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10177, "upload_time": "2018-08-12T23:46:57", "url": "https://files.pythonhosted.org/packages/b1/9a/6c2ea29c472726e4c806602452281d536cf66ed91d360c37cedc37dd4053/pydradis3-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1dfcffe90170d0651071fb6828f06c84", "sha256": "b4625ae810a04306faf0677d06aac819441ab202df2562916090ae8e39152d23" }, "downloads": -1, "filename": "pydradis3-0.2.2.tar.gz", "has_sig": false, "md5_digest": "1dfcffe90170d0651071fb6828f06c84", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12497, "upload_time": "2018-08-12T23:47:00", "url": "https://files.pythonhosted.org/packages/8a/70/8174e4d4473960090a908255efe6c746cb57ff1753f2eee28f3b7363a015/pydradis3-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "288155c03bab434c9fb5af5a52429c0a", "sha256": "a79139dcb9a55173c7f1eb4869149d94d3e12b38ee90131853abe1be9b6275ab" }, "downloads": -1, "filename": "pydradis3-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "288155c03bab434c9fb5af5a52429c0a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10198, "upload_time": "2018-08-14T11:37:16", "url": "https://files.pythonhosted.org/packages/7c/bf/708d3cee9c7ff430445fc3828d68228b41104a187bc034964c0268a65e5a/pydradis3-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6521dd4a4a5e463fdb366630144cc20c", "sha256": "ad05501eaa9b5533218c3d1f58a2e8ccf23cf3c2735d746f84dddd3137954908" }, "downloads": -1, "filename": "pydradis3-0.2.3.tar.gz", "has_sig": false, "md5_digest": "6521dd4a4a5e463fdb366630144cc20c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12585, "upload_time": "2018-08-14T11:37:18", "url": "https://files.pythonhosted.org/packages/d0/49/66d6867a753b1f65a0034caad414eed84ddeb07b1eae66aa7468379d0a93/pydradis3-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "288155c03bab434c9fb5af5a52429c0a", "sha256": "a79139dcb9a55173c7f1eb4869149d94d3e12b38ee90131853abe1be9b6275ab" }, "downloads": -1, "filename": "pydradis3-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "288155c03bab434c9fb5af5a52429c0a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10198, "upload_time": "2018-08-14T11:37:16", "url": "https://files.pythonhosted.org/packages/7c/bf/708d3cee9c7ff430445fc3828d68228b41104a187bc034964c0268a65e5a/pydradis3-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6521dd4a4a5e463fdb366630144cc20c", "sha256": "ad05501eaa9b5533218c3d1f58a2e8ccf23cf3c2735d746f84dddd3137954908" }, "downloads": -1, "filename": "pydradis3-0.2.3.tar.gz", "has_sig": false, "md5_digest": "6521dd4a4a5e463fdb366630144cc20c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12585, "upload_time": "2018-08-14T11:37:18", "url": "https://files.pythonhosted.org/packages/d0/49/66d6867a753b1f65a0034caad414eed84ddeb07b1eae66aa7468379d0a93/pydradis3-0.2.3.tar.gz" } ] }