Add support for VirusTotal using APIv3 #373
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Running the master branch of Sublist3r returns the error displayed below. The Virustotal URL is no longer valid and can be replaced to use the API (version 3).
These changes allow users to pass their Virustoal API key via the command-line flag. The API key will be passed to the Virustotal enumerator object. The flag is not required; rather, it defaults to None, and a value check is included in the Virustotal class, leaving the remaining objects untouched.
Alternatively, Virustotal can be completely removed from the list of supported engines, or you can mark this repo as archived to indicate that it is no longer supported. Ideally, this PR can be merged to support the continued use of Virtustotal.
Should you no longer support Virustotal, supported_engines and chosenEnums in the main() function should be modified to exclude Virustotal; it will not work without modifying the URL.
I have tested changes using Python 3.11.2 (Linux). If there is interest in merging this PR, I can test other Python versions and the Windows OS.