本文共 1918 字,大约阅读时间需要 6 分钟。
只是供大家娱乐下,另外希望相关人员不要做这么容易刷赞的网站。
刷点击量,就是重复打开、关闭链接。
当然重点不在这,重点是要知道怎么才能重刷。 从浏览器中打开网址(http://www.xxxxxxxx.com/lxxxx.html),抱歉匿了,读者可以试试其他网站。 点击“投票支持”或者"赞"按钮,这时按钮不能继续点击了,关闭浏览器后,再打开网址又可以点击了。 发现了这个机制,然后找到点击“投票支持”后发送的链接,可以在浏览器chrome的Network中查看。 剩下的就是写个循环不断重复打开、关闭链接的操作。 这是个偏门,很多网站都无法这么简单的刷点击量。#!/usr/bin/python# -*- coding: UTF-8 -*-import urllib2import timeimport randomfor i in range(100): '“100”就是刷赞的数量,链接也匿了' f = urllib2.urlopen('http://www.xxxxx.com/xxxxxx.html') #查看是否成功打开 print f.read() f.close() #稍微休息下 time.sleep(random.random())
偶尔想换个ip,可网上购买虚拟机,断网重连换ip。以下代码在XP系统上可用于换ip。再结合刷赞代码可以做到一个ip刷一次赞。
import subprocessimport timeclass myWang(): def getIp(self): cmd = subprocess.check_output('ipconfig').split(':') ip = cmd[-3].split(' ')[0].strip() #获取CMD输出内容中的宽带IP,系统的公网ip。 return ip def reIp(self):#用CMD命令断网,连网。subprocess.call的速度比os.system快一点 subprocess.call(r"rasdial 宽带连接 /DISCONNECT") subprocess.call(r"rasdial 宽带连接 05669346520 666888")aip = myWang()count = 0firstIp = aip.getIp()#延迟时间miao = 10while True: aip.reIp() nextIp = aip.getIp() if nextIp == firstIp: continue count += 1 print count print nextIp firstIp = nextIp time.sleep(miao)
结合起来的代码如下。
import urllib2import timeimport subprocessclass myWang(): def getIp(self): cmd = subprocess.check_output('ipconfig').split(':') ip = cmd[-3].split(' ')[0].strip() #获取CMD输出内容中的宽带IP,系统的公网ip。 return ip def reIp(self):#用CMD命令断网,连网。subprocess.call的速度比os.system快一点 subprocess.call(r"rasdial 宽带连接 /DISCONNECT") subprocess.call(r"rasdial 宽带连接 05669346520 666888")aip = myWang()firstIp = aip.getIp()for i in range(100): '“100”就是刷赞的数量,链接也匿了' f = urllib2.urlopen('http://www.xxxxx.com/xxxxxx.html') #查看是否成功打开 print f.read() f.close() aip.reIp() nextIp = aip.getIp() while nextIp == firstIp: aip.reIp() nextIp = aip.getIp() print nextIp firstIp = nextIp
转载地址:http://lktni.baihongyu.com/