关于网络投票刷票神器的代码编写
今天我抽空来跟大家说下网络投票刷票神器的代码编写问题,因为最近有太多的小伙伴都是因为不知道怎么编写网络投票刷票神器的代码找到我,都想从我这里咨询到这些相关的问题,那么这里我直接把已知的一些网络投票刷票神器的代码分享给大家吧,这样大家就可以直接借鉴下了,就不需要一直来问我了
cout += 1;
tempmax = cout / total
if tempmax > maxn:
maxn = tempmax;
pos = noi
if pos == 8 or pos == 3:
ret = “0”
break;
ret = ret + str(pos);
return ret
def DownloadImage():
urimg = urllib2.urlopen(“http://info.zjnu.edu.cn/zqtp/imgchk/validatecode.asp”).read()
img = Image.open(StringIO.StringIO(urimg))
img.save(r”.\20.jpeg”)
def Submit(cc):
post_data = urllib.urlencode(
{“161”: “161”, “170”: “170”, “185”: “185”, “164”: “164”, “157”: “157”, “validatecode”: cc, “post”: “post”,
“vote_type”: “1”, “Submit”: “%C8%B7%B6%A8”});
#print post_data
path = “http://info.zjnu.edu.cn/zqtp/check.asp”
req = urllib2.Request(path, post_data)
conn = urllib2.urlopen(req)
txt = conn.read()
print txt.decode(“gbk”)
def ChangeIp(x):
os.system(“WindowsApplication1\\” + str(“%03d” % x) + “.bat”)
if __name__ == “__main__”:
print “程序开始运行”.decode(“utf-8″)
os.system(r”WindowsApplication1\001.bat”)
for x in range(2, 250):
print “开始修改IP…”.decode(“utf-8”), str(“%03d” % x) + “.bat”
ChangeIp(x)
print “IP修改成功!”.decode(“utf-8”)
cj = COOKIElib.COOKIEJar()
opener = urllib2.build_opener(urllib2.HTTPCOOKIEProcessor(cj))
opener.addheaders = [(‘User-agent’, ‘Opera/9.23’)]
urllib2.install_opener(opener)
while True:
try:
DownloadImage()
except Exception, ex:
cc = 0
break;
cc = CheckCode()
print cc;
if int(cc) != 0:
break;
if cc == 0:
print “IP修改有误,不准备投票,直接跳过….”.decode(“utf-8”)
continue
print “准备开始投票”.decode(“utf-8”)
print “|——————————————————-|”
Submit(cc)
print “|——————————————————-|”
print “程序运行结束”.decode(“utf-8”)
版权说明:文章均为海王信投票专家原创,转载本文请注明出处和附带本文链接:https://www.aivtp.com/4280.html