Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- NetMums Super Secure Virus and Harmful Content Blocking Script
- 2017 Daniel Hannon
- Free To Distribute """
- hostsfile = open("hosts.txt","r+")
- hostsfile.write("#NETMUMS WEB SAFETY HOSTS FILE \n")
- hostsfile.write("#FOR UNIX SYSTEMS PLACE IN /etc/hosts \n")
- hostsfile.write("#FOR WINDOWS SYSTEMS PLACE IN %SystemRoot%\System32\drivers\etc\hosts \n")
- def virusblock():
- word_bank = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"]
- nasty_subdomain = [".com",".net",".co.uk",".it",".be",".ie",".gov",".io",".jp"]
- domain_of_nasty_website=[0]
- domain_to_block = ""
- while len(domain_to_block) < 13:
- domain_to_block = ""
- for i in domain_of_nasty_website:
- domain_to_block = domain_to_block + str(word_bank[i])
- for f in nasty_subdomain:
- hostsfile.write("127.0.0.1 http://www.%s%s \n" % (domain_to_block, f))
- for e in range(len(domain_of_nasty_website)):
- if e == 0:
- domain_of_nasty_website[e] = domain_of_nasty_website[e]+1
- if domain_of_nasty_website[e] > (len(word_bank)-1):
- domain_of_nasty_website[e] = 0
- if (len(domain_of_nasty_website)-1) - e == 0:
- domain_of_nasty_website.append(0)
- else:
- domain_of_nasty_website[e+1] = domain_of_nasty_website[e+1] + 1
- virusblock()
Advertisement
Add Comment
Please, Sign In to add comment