Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- import sys
- import urllib2
- import urllib
- import threading
- websites = []
- websiteheaders = []
- def logfile(websiteheaders):
- for line in websiteheaders:
- if "Server" in line:
- print line
- def headerophalen(websites):
- for url in websites:
- response = urllib2.urlopen(url)
- headers = str(response.info())
- websiteheaders.append(headers)
- logfile(websiteheaders)
- def main():
- hostsfile = open ("hosts.txt", "r")
- for line in hostsfile:
- websites.append("http://" + line)
- thread = threading.Thread(target=headerophalen, args=(websites,))
- thread.start()
- if __name__=="__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement