Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sensitive():
- print("Checking for files that may hold sensitive information...\n")
- time.sleep(5)
- pages = ['/sitemap.xml', '/robots.txt', '/.svn', '/.git', '/.htpasswd', '/.htaccess']
- part3 = []
- for page in pages:
- r = requests.get('http://' + domain + page)
- if r.status_code == 200:
- result = (page + " found!")
- part3.append(result)
- elif r.status_code == 403:
- result2 = (page + " File 403'd (protected)")
- part3.append(result2)
- else:
- result3 = (page + " not found")
- part3.append(result3)
- part3 = ("\n".join(map(str, part3)))
- print(part3)
- return part3
- main()
- correct code is above ^^^
- change order of code and add to the solution that the "domain" variable is undefined.
- good luck fam
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement