Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # coding: utf-8
- # usuage : python file.py site.txt
- import requests, sys
- from time import time as timer
- from multiprocessing.dummy import Pool as ThreadPool
- try:
- with open(sys.argv[1], 'r') as f:
- woh = f.read().splitlines()
- except IOError:
- pass
- woh = list((woh))
- def redpage(url):
- try:
- req_check = requests.get(url, verify=False)
- if 'example for detect ' in req_check.content:
- print ('[Your Site Is Detect Malicious Site] ===> '+url)
- else:
- print ('[Your Site Clean] ===> '+url)
- except:
- pass
- def checking(url):
- try:
- redpage(url)
- except:
- pass
- def Main():
- try:
- start = timer()
- pp = ThreadPool(25)
- pr = pp.map(checking, woh)
- print('Time: ' + str(timer() - start) + ' seconds')
- except:
- pass
- if __name__ == '__main__':
- Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement