Advertisement
Guest User

for loop

a guest
Apr 27th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. def sensitive(domain,filename):
  2. print("Checking for files that may hold sensitive information...\n")
  3. time.sleep(5)
  4. pages = ['/sitemap.xml', '/robots.txt', '/.svn', '/.git', '/.htpasswd', '/.htaccess']
  5. part3 = []
  6. for page in pages:
  7. r = requests.get('http://' + domain + page)
  8. if r.status_code == 200:
  9. result = (page + " found!")
  10. else:
  11. print("not found")
  12.  
  13. FOR LOOP ^^^
  14. remove the colon after pages: and change "else:" to "eles;" -
  15. change the order of a few lines to mess it up more
  16.  
  17. correct code is one above
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement