<gh_stars>0

import requests
import time
import json
list= str(input('file(s) name(S)'))
Urls = []
with open(list, 'r') as f:
    lines = f.readlines()
    for line in lines:
        s = line.rstrip()
        Urls.append(s)
API_key = '' #add your api here
url = 'https://www.virustotal.com/vtapi/v2/url/report'
for i in Urls:
    parameters = {'apikey': API_key, 'resource': i}
    r= requests.get(url=url, params=parameters)
    print(r.text)
    response= json.loads(r.text)
    try:
        if response['positives'] <= 0:
            with open('benign_dom.csv', 'a')  as benign:
                benign.write(i + ',benign\n')
        else:
            with open('mal_dom.csv', 'a')  as malicious:
                malicious.write(i + ', malicious\n')
    
            except:
        print('url scan retrived null')
    time.sleep(15) #The ideal interval time between each scan is 15 sec

import requests
import time
import json
list= str(input('file(s) name(S)'))
Urls = []
with open(list, 'r') as f:
    lines = f.readlines()
    for line in lines:
        s = line.rstrip()
        Urls.append(s)
API_key = '' #add your api here
url = 'https://www.virustotal.com/vtapi/v2/url/report'
for i in Urls:
    parameters = {'apikey': API_key, 'resource': i}
    r= requests.get(url=url, params=parameters)
    print(r.text)
    response= json.loads(r.text)
    try:
        if response['positives'] <= 0:
            with open('benign_dom.csv', 'a')  as benign:
                benign.write(i + ',benign\n')
        else:
            with open('mal_dom.csv', 'a')  as malicious:
                malicious.write(i + ', malicious\n')
    
            except:
        print('url scan retrived null')
    time.sleep(15) #The ideal interval time between each scan is 15 sec
#add your api here #The ideal interval time between each scan is 15 sec