This Python code scans a list of URLs using the VirusTotal API to check if they have been detected as malicious by any anti-virus (AV) engines.
Prerequisites • Python 3.x • requests library • VirusTotal API key
Installation
- Install Python 3.x from https://www.python.org/downloads/
- Install the requests library by running pip install requests in your terminal or command prompt.
Usage
- Obtain a VirusTotal API key from https://www.virustotal.com/gui/join-us
- Create a CSV file named 'url_list.csv' in the same directory as your Python code.
- Add the list of URLs you want to scan in the first column of the CSV file.
- Replace the apikey variable in the code with your VirusTotal API key.
- Run the code using the command python url_scanner.py in your terminal or command prompt.
The code will output whether each URL in the list is malicious or not, based on the results of the VirusTotal scan. If a URL is detected as malicious, the code will also output the number of AV engines that detected it as such.