{ "info": { "author": "Dextroz", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "# virustotal-python \ud83d\udc0d\n![PyPI](https://img.shields.io/pypi/v/virustotal-python.svg?style=flat-square)\n\nA light wrapper around the public VirusTotal API.\n\n# Dependencies\n* Written in Python 3.7.\n\n```\n[dev-packages]\nblack = \"*\"\ntwine = \"*\"\npytest = \"*\"\n\n[packages]\nrequests = {extras = [\"socks\"],version = \"*\"}\n```\n\nInstall `virustotal-python` using either:\n* `pip3 install virustotal-python`, `pipenv install`, `pip3 install -r requirements.txt`, `python setup.py install`.\n\n## Example Usage\n```python\nfrom virustotal_python import Virustotal\nfrom pprint import pprint\n\n# Normal Initialisation.\nvtotal = Virustotal(\"Insert API Key Here.\")\n\n# NEW as of version 0.0.5: Proxy support.\n# Example Usage: Using HTTP(S)\nvtotal = Virustotal(\n \"Insert API Key Here.\",\n {\"http\": \"http://10.10.1.10:3128\", \"https\": \"http://10.10.1.10:1080\"})\n# Or using SOCKS\nvtotal = Virustotal(\n \"Insert API Key Here.\",\n {\"http\": \"socks5://user:pass@host:port\", \"https\": \"socks5://user:pass@host:port\"})\n\n# NOTE: Check virustotal.py for docstrings containing full parameter descriptions.\n\n# Send a file to Virustotal for analysis.\nresp = vtotal.file_scan(\"./tests.py\") # PATH to file for querying.\n\n# Resend a file to Virustotal for analysis.\n# A list containing the resource (SHA256) HASH of the file above.\nresp = vtotal.file_rescan(\n [\"75efd85cf6f8a962fe016787a7f57206ea9263086ee496fc62e3fc56734d4b53\"]\n)\n# A list containing md5/sha1/sha256 hashes. Can be a combination of any of the three allowed hashes (MAX 25 items).\n# NOTE: The second hash here is flagged as malicious by multiple engines.\nresp = vtotal.file_rescan(\n [\n \"75efd85cf6f8a962fe016787a7f57206ea9263086ee496fc62e3fc56734d4b53\",\n \"9f101483662fc071b7c10f81c64bb34491ca4a877191d464ff46fd94c7247115\",\n ]\n)\n\n# Retrieve scan report(s) for given file(s) from Virustotal.\n# A list containing the resource (SHA256) HASH of a known malicious file.\nresp = vtotal.file_report(\n [\"9f101483662fc071b7c10f81c64bb34491ca4a877191d464ff46fd94c7247115\"]\n)\n# A list of resource(s). Can be `md5/sha1/sha256 hashes` and/or combination of hashes and scan_ids (MAX 4 per standard request rate).\n# The first is a scan_id, the second is a SHA256 HASH.\nresp = vtotal.file_report(\n [\n \"75efd85cf6f8a962fe016787a7f57206ea9263086ee496fc62e3fc56734d4b53-1555351539\",\n \"9f101483662fc071b7c10f81c64bb34491ca4a877191d464ff46fd94c7247115\",\n ]\n)\n\n# Query url(s) to VirusTotal.\n# A list containing a url to be scanned by VirusTotal.\nresp = vtotal.url_scan([\"ihaveaproblem.info\"]) # Query a single url.\n# A list of url(s) to be scanned by VirusTotal (MAX 4 per standard request rate).\nresp = vtotal.url_scan(\n [\"ihaveaproblem.info\", \"google.com\", \"wikipedia.com\", \"github.com\"]\n)\n\n# Retrieve url report(s)\n# A list containing the url of the report to be retrieved.\nresp = vtotal.url_report([\"ihaveaproblem.info\"]) # Query a single url.\n# A list of the url(s) and/or scan_id(s) report(s) to be retrieved (MAX 4 per standard request rate).\n# The first object in the list is a scan_id.\nresp = vtotal.url_report(\n [\n \"fd21590d9df715452c8c000e1b5aa909c7c5ea434c2ddcad3f4ccfe9b0ee224e-1555352750\",\n \"google.com\",\n \"wikipedia.com\",\n \"github.com\",\n ],\n scan=1,\n)\n\n# Query an IP to Virustotal.\nresp = vtotal.ipaddress_report(\"90.156.201.27\")\n\n# Retrieve a domain report.\nresp = vtotal.domain_report(\"027.ru\")\n\n# Put a comment onto a specific resource.\nresp = vtotal.put_comment(\n \"9f101483662fc071b7c10f81c64bb34491ca4a877191d464ff46fd94c7247115\",\n comment=\"#watchout, this looks very malicious!\",\n)\n\npprint(resp)\n```\n\n```python\n# Example resp for url_scan().\n# Assuming you have already initiated Virustotal() and imported pprint.\nresp = vtotal.url_scan([\"ihaveaproblem.info\"]) # Query a single url.\npprint(resp)\n{'json_resp': {'permalink': 'https://www.virustotal.com/url/fd21590d9df715452c8c000e1b5aa909c7c5ea434c2ddcad3f4ccfe9b0ee224e/analysis/1549973453/',\n 'resource': 'http://ihaveaproblem.info/',\n 'response_code': 1,\n 'scan_date': '2019-02-12 12:10:53',\n 'scan_id': 'fd21590d9df715452c8c000e1b5aa909c7c5ea434c2ddcad3f4ccfe9b0ee224e-1549973453',\n 'url': 'http://ihaveaproblem.info/',\n 'verbose_msg': 'Scan request successfully queued, come back '\n 'later for the report'},\n 'status_code': 200}\n```\n\n## Running Tests\n\n* `Navigate to ./virustotal_python/`\n\n* `Run the command: pytest -s tests.py`\n\n## Changelog\n\n* 0.0.7 - Added tests. Updated dependencies, Updated examples and README, `url_report` param `scan` now accepts `type(int)`, **no** longer `type(str)`\n\n* 0.0.6 - Fixed usage example and dependencies in README.md, Setup github.io website, updated requirements.txt.\n\n* 0.0.5 - Added Proxy support. Via HTTP(S) or using SOCKS: See [#8](https://github.com/Dextroz/virustotal-python/pull/8).\n\n* 0.0.4 - README.md updated; dependencies updated.\n\n* 0.0.3 - Updated dependencies for urllib3 security vulnerability.\n\n* 0.0.2 - Changes to file_rescan(), file_report(), url_scan(), url_report() to improve ease of use of the wrapper. See issue [#2](https://github.com/Dextroz/virustotal-python/issues/2). Examples updated for changes.\n\n* 0.0.1 - Inital release of virustotal-python. Covered all endpoints of the Virustotal public API. \n\n## Authors -- Contributors\n\n* **Dextroz** - *Author* - [Dextroz](https://github.com/Dextroz)\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) for details.", "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/Dextroz/virustotal-python", "keywords": "Light VirusTotal Wrapper Public API Library", "license": "", "maintainer": "", "maintainer_email": "", "name": "virustotal-python", "package_url": "https://pypi.org/project/virustotal-python/", "platform": "", "project_url": "https://pypi.org/project/virustotal-python/", "project_urls": { "Homepage": "https://github.com/Dextroz/virustotal-python" }, "release_url": "https://pypi.org/project/virustotal-python/0.0.7/", "requires_dist": null, "requires_python": "", "summary": "A light wrapper around the public VirusTotal API.", "version": "0.0.7" }, "last_serial": 5448316, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5cbfb3bcfc07f0616259cb8319b2761f", "sha256": "08744fa08794fb7722beb2da7a06cc2fadfa459b4697afa339b0c80e1b43b732" }, "downloads": -1, "filename": "virustotal_python-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5cbfb3bcfc07f0616259cb8319b2761f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6858, "upload_time": "2019-02-13T19:02:05", "url": "https://files.pythonhosted.org/packages/ec/23/623f1100f568959ef732dfc92a5197421cef7e27b5ae5505e1c5c6f4b328/virustotal_python-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "590ee10c8d3142bb8389b5229773b1ba", "sha256": "f59ecb4deadeabf4c748f567d09a67920a1433c5033246c6d5b9d7b70466da37" }, "downloads": -1, "filename": "virustotal-python-0.0.1.tar.gz", "has_sig": false, "md5_digest": "590ee10c8d3142bb8389b5229773b1ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4768, "upload_time": "2019-02-13T19:02:07", "url": "https://files.pythonhosted.org/packages/8f/cb/bb1bc07b56ed2349bb7fec89a9f3e05ec326e4c248f41e425d0d372d9c30/virustotal-python-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "17c0de733db4b0f630781d9eaf39e210", "sha256": "b55a8d97864c7de2559d3704f7425e54f9116b4a83723b51202c06921584d128" }, "downloads": -1, "filename": "virustotal_python-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "17c0de733db4b0f630781d9eaf39e210", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7568, "upload_time": "2019-04-15T19:33:04", "url": "https://files.pythonhosted.org/packages/39/3a/9c60a8c6921034ad114467aa2f000667080824c4ded5995f9e38c096281c/virustotal_python-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "52e92aea67bfbd1411b35fdd8db682e9", "sha256": "f4bd371fc8a860691ba6a551069f2d2e924cde60eb539e8126672d0d0e19794c" }, "downloads": -1, "filename": "virustotal-python-0.0.2.tar.gz", "has_sig": false, "md5_digest": "52e92aea67bfbd1411b35fdd8db682e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5167, "upload_time": "2019-04-15T19:33:06", "url": "https://files.pythonhosted.org/packages/5a/9e/c98f6ffcbc7b004da9814ff3f1c87f520e1c61f18c6495b1be81e8b2bdeb/virustotal-python-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "9505f7901a460ea72b9bd05a9aa346ad", "sha256": "0ee5da9909bee2a8778b1cff13d44f1acbef51cfecf841c6705c6a3090e659b0" }, "downloads": -1, "filename": "virustotal_python-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "9505f7901a460ea72b9bd05a9aa346ad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7566, "upload_time": "2019-04-20T14:48:45", "url": "https://files.pythonhosted.org/packages/1e/9c/7e86ecb46051fc451b9e977bda4926780eff780ba1afce6ec134cb400a91/virustotal_python-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da2822b7086c064bbffea7abd8cb3717", "sha256": "80649e984d7796084f0f589356630ec0a513d23670b707abc377e8f2e7aae133" }, "downloads": -1, "filename": "virustotal-python-0.0.3.tar.gz", "has_sig": false, "md5_digest": "da2822b7086c064bbffea7abd8cb3717", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5178, "upload_time": "2019-04-20T14:48:47", "url": "https://files.pythonhosted.org/packages/18/24/10da8f344ed979cd9b6d71b777533314952911eea1cffa2e50a7cc877b28/virustotal-python-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "5b8b7576d6d1d4249c8a7677a0deca06", "sha256": "ba7698bcdd124e8d630368b4edafa88985a32b4e1384347086ed3ae3c75d247f" }, "downloads": -1, "filename": "virustotal_python-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "5b8b7576d6d1d4249c8a7677a0deca06", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7616, "upload_time": "2019-05-02T22:58:56", "url": "https://files.pythonhosted.org/packages/d7/11/eab929e6fa1fde70af8eeb4fdf357f00f03b755d5070073228b56ca06b84/virustotal_python-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1f474e5d717ed61ce3668cb99ac065fa", "sha256": "7da0c046f155fab0c394fd9fa156e5e2328ebcadc7cb13b667f06465dde9e9b6" }, "downloads": -1, "filename": "virustotal-python-0.0.4.tar.gz", "has_sig": false, "md5_digest": "1f474e5d717ed61ce3668cb99ac065fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5219, "upload_time": "2019-05-02T22:58:57", "url": "https://files.pythonhosted.org/packages/e1/76/b06bde1e7248154dd7095089d0491ed3f0ea34118bd47b10b896b0f9af1b/virustotal-python-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "9125093dee9a54ebb30cdb4f3983b10d", "sha256": "a640ea70bed6dfa30435a4303c03ff57bcc06d6c9023982f68c06eb77e9e5661" }, "downloads": -1, "filename": "virustotal_python-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "9125093dee9a54ebb30cdb4f3983b10d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7977, "upload_time": "2019-05-05T15:42:54", "url": "https://files.pythonhosted.org/packages/d9/3a/c50638da71cbd7fe6a4e8dc32d581f6a9c854916a21da3a38189ae0fac10/virustotal_python-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1f3eece1dc6eb9856ee29cf126c7366e", "sha256": "2dff4893cac527ed5d080635f3fbf668e423f06ffcbee4b6e688c272bdf0cc02" }, "downloads": -1, "filename": "virustotal-python-0.0.5.tar.gz", "has_sig": false, "md5_digest": "1f3eece1dc6eb9856ee29cf126c7366e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5516, "upload_time": "2019-05-05T15:42:55", "url": "https://files.pythonhosted.org/packages/60/b2/348a0850cc457b08b21b36efa7e708f3809b41fa800616077029a2e0310f/virustotal-python-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "29f3936d653e6d20c706cf1a5e04cdd5", "sha256": "df85e56154a1d950e63a20391b2c4c63f1ecc2c7b6c88f3f40d512d9f28e25b7" }, "downloads": -1, "filename": "virustotal_python-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "29f3936d653e6d20c706cf1a5e04cdd5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8100, "upload_time": "2019-05-14T14:21:30", "url": "https://files.pythonhosted.org/packages/c1/d5/d7fd56a3d3d36a89d134e7e52b483ca03b7e2526231efc2333eb58e9e0da/virustotal_python-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dc5c84fc083f6798389da4177c0c36c1", "sha256": "fe63121ef3e7af85e5e6184a9bf10ba165ffcb07582891240edb7397c49896c4" }, "downloads": -1, "filename": "virustotal-python-0.0.6.tar.gz", "has_sig": false, "md5_digest": "dc5c84fc083f6798389da4177c0c36c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5648, "upload_time": "2019-05-14T14:21:32", "url": "https://files.pythonhosted.org/packages/75/5b/0112af8769032c06133bc7cc5323399a3b009638ee08ea4f4bf26bf2c125/virustotal-python-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "ffdbeb6a29475a2e82a0297e9a2a1576", "sha256": "b3d32f3728080b2286ffa3a140d848ad3edea9cba6cb2d951a9b54386e7af3e1" }, "downloads": -1, "filename": "virustotal-python-0.0.7.tar.gz", "has_sig": false, "md5_digest": "ffdbeb6a29475a2e82a0297e9a2a1576", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6757, "upload_time": "2019-06-25T20:29:00", "url": "https://files.pythonhosted.org/packages/c4/40/5fb0eb8517526edba7ed2bd69d92f5b713924b8b8ebcd4602138d8550202/virustotal-python-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ffdbeb6a29475a2e82a0297e9a2a1576", "sha256": "b3d32f3728080b2286ffa3a140d848ad3edea9cba6cb2d951a9b54386e7af3e1" }, "downloads": -1, "filename": "virustotal-python-0.0.7.tar.gz", "has_sig": false, "md5_digest": "ffdbeb6a29475a2e82a0297e9a2a1576", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6757, "upload_time": "2019-06-25T20:29:00", "url": "https://files.pythonhosted.org/packages/c4/40/5fb0eb8517526edba7ed2bd69d92f5b713924b8b8ebcd4602138d8550202/virustotal-python-0.0.7.tar.gz" } ] }