Advertisement
RaiC0d3r

Untitled

Aug 4th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. #!/usr/bin/python
  2. import urllib
  3. import urllib3
  4. from urllib import urlopen as o
  5. import requests, re, urllib2, os, sys, codecs
  6. from multiprocessing.dummy import Pool
  7. from time import time as timer
  8. import time,random
  9. from random import sample as rand
  10. from platform import system
  11. import datetime
  12. from colorama import Fore
  13. from colorama import Style
  14. from pprint import pprint
  15. from colorama import init
  16. from urlparse import urlparse
  17. from requests.packages.urllib3.exceptions import InsecureRequestWarning
  18.  
  19. init (autoreset=True)
  20.  
  21. requests.packages.urllib3.disable_warnings (InsecureRequestWarning)
  22. ####### Colors ######
  23.  
  24. fr = Fore.RED
  25. fc = Fore.CYAN
  26. fw = Fore.WHITE
  27. fg = Fore.GREEN
  28. sd = Style.DIM
  29. sn = Style.NORMAL
  30. sb = Style.BRIGHT
  31.  
  32. #######################
  33. now = datetime.datetime.now()
  34. print('\n\033[92m STARTED AT: ' + str(now))
  35. start_raw = raw_input("\n\033[92m[!]\033[91m WELCOME TO PrivateBot ENTER LIST OF WEBSITES : ")
  36. try:
  37. with open(start_raw, 'r') as f:
  38. sites = f.read().splitlines()
  39. except IOError:
  40. pass
  41. sites = list((sites))
  42.  
  43. def isitdown(sites):
  44. try:
  45. request = requests.get(sites, timeout=10)
  46. kode = request.status_code
  47. if kode != 500 or kode != 501 or kode != 502 or kode != 503 or kode != 301 or kode != 302 or kode != 303 or kode != 304 or kode != 443 :
  48. print '[{}Site]: {} {} ==> {}{} isitdown {}{} Up '.format(sb, sd, sites, fc,fc, sb,fg)
  49. open('siteisup.txt', 'a').write('http://'+sites+'\n')
  50. except:
  51. print '[{}Site]: {} {} ==> {}{} isitdown {}{} Down '.format(sb, sd, sites, fc,fc, sb,fr)
  52.  
  53.  
  54. def Main():
  55. try:
  56.  
  57. start = timer()
  58. ThreadPool = Pool(100)
  59. Threads = ThreadPool.map(isitdown, sites)
  60. print('PrivateBot Finished in : ' + str(timer() - start) + ' seconds')
  61. except:
  62. pass
  63.  
  64.  
  65. if __name__ == '__main__':
  66. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement