刷票

当前位置: > 刷票

技巧:简易的刷票系统软件(提升IP限定开展投票)

当前栏目:刷票|更新时间:2020-04-25 20:39:20|浏览:0

一、序言

坚信大伙儿平常毫无疑问会接到盆友发过来的连接,开启一看,哦,必须投票。投完票后弹出来一个网页页面(恭贺您,您早已投票取得成功),再度点一下的情况下发觉,啊哈,您的IP(***.***.***.***)早已投过票了,不可以反复投票。此刻微信投票 代理,人们将会会想,能否提升ip详细地址的限定开展刷票呢?拥有那样的念头,那就要做吧,下边我将详细介绍我这个简易的刷票系统软件,仅作有要求的园友们参照。

二、控制系统设计

系统软件关键完成的是提升IP限定开展刷票,在其中,由IP收集控制模块承担从互联网技术往上爬取代理商IP,放进阻塞队列,该每日任务会按时实行。以后由投票控制模块从阻塞队列中获得IP,并开展设定,随后开展投票。系统流程图以下:

三、系统软件技术性

系统软件应用HttpClient JSoup c#多线程来进行刷票,HttpClient用以开展投票,JSoup用以分析网页页面,多线程技术用以分离出来每日任务,促使职责分工更为确立。应用来到经营者顾客方式,该方式立即应用BlockingQueue来完成。

四、系统软件详细介绍

系统软件关键分成三个控制模块:

① IP收集控制模块

② 投票控制模块

③ IP信息内容控制模块

在其中,IP收集控制模块关键是以互联网技术抓取IP代理商信息内容,并将该信息内容放进阻塞队列微信投票 代理,那样就可以仿冒IP,开展数次投票。

在其中,投票控制模块从IP收集控制模块放进阻塞队列取下IP信息内容,并设置代理,寻找投票通道详细地址,随后开展投票实际操作。

在其中,IP信息内容控制模块主要是对抓取的IP信息内容开展了封裝,便捷别的控制模块开展实际操作。

4.1 IP收集控制模块

IP收集控制模块流程表以下

几个方面表明:

1.系统软件应用的代理商IP网站URL为http://www.kuaidaili.com/,www.xicidaili.com。

2.获取IP信息内容为获取一条IP信息内容,并分辨历史时间IP表是不是早已存有,若存有微信投票 代理,表达以前早已添加过此IP信息内容,则立即丢掉,相反,则添加序列并添加历史时间IP表。

3.此每日任务会按时打开,如一个小时抓取一次代理商IP。

4.2 投票控制模块

投票控制模块流程表以下

几个方面表明:

1.投票网址http://www.hnxdf.com/vote/,人们选择的第一位开展投票,剖析出投票的通道为http://www.hnxdf.com/vote/iRadio_vote.asp?VoTeid=215。

2.依据IP收集控制模块放进序列的IP信息内容开展设定,随后开展投票。

4.3 IP信息内容控制模块

此控制模块关键对从网址抓取的IP信息内容开展了封裝,便捷别的控制模块开展实际操作。

五、系统软件编码架构

系统软件的全部编码架构以下

在其中,bean包的IpInfo封裝了抓取的IP信息内容。

在其中,entrance包的Vote为系统软件的通道。

在其中,thread包的IPCollectTask为抓取代理商IP每日任务,VoteThread为开展投票进程。

六、系统软件编码

1.IpInfo.javapackage com.hust.grid.leesf.bean;public class IpInfo { public IpInfo(String ipAddress, int port, String location, String anonymousType, String type, String confirmTime) { this(ipAddress, port, location, anonymousType, type, confirmTime, null, null); } public IpInfo(String ipAddress, int port, String location, String anonymousType, String type, String confirmTime, String getPostSupport, String responseSpeed) { this.ipAddress = ipAddress; this.port = port; this.location = location; this.anonymousType = anonymousType; this.type = type; this.confirmTime = confirmTime; this.getPostSupport = getPostSupport; this.responseSpeed = responseSpeed; } public String getIpAddress() { return ipAddress; } public void setIpAddress(String ipAddress) { this.ipAddress = ipAddress; } public int getPort() { return port; } public void setPort(int port) { this.port = port; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public String getAnonymousType() { return anonymousType; } public void setAnonymousType(String anonymousType) { this.anonymousType = anonymousType; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getConfirmTime() { return confirmTime; } public void setConfirmTime(String confirmTime) { this.confirmTime = confirmTime; } public String getGetPostSupport() { return getPostSupport; } public void setGetPostSupport(String getPostSupport) { this.getPostSupport = getPostSupport; } public String getResponseSpeed() { return responseSpeed; } public void setResponseSpeed(String responseSpeed) { this.responseSpeed = responseSpeed; } @Override public boolean equals(Object anthor) { if (this == anthor) { return true; } if (anthor == null || getClass() != anthor.getClass()) { return false; } IpInfo ipInfo = (IpInfo) anthor; return (this.ipA ddress.equals(ipInfo.ipAddress) && this.port == ipInfo.port && this.location.equals(ipInfo.location) && this.anonymousType.equals(ipInfo.anonymousType) && this.type.equals(ipInfo.type) && this.confirmTime .equals(ipInfo.confirmTime)) && this.getPostSupport.equals(ipInfo.getPostSupport) && this.responseSpeed.equals(ipInfo.responseSpeed); } @Override public int hashCode() { int hash = 5; hash = 89 * hash (this.ipAddress != null ? this.ipAddress.hashCode() : 0); hash = 89 * hash this.port; hash = 89 * hash (this.location != null ? this.location.hashCode() : 0); hash = 89 * hash (this.anonymousType != null ? this.anonymousType.hashCode() : 0); hash = 89 * hash (this.type != null ? this.type.hashCode() : 0); hash = 89 * hash (this.confirmTime != null ? this.confirmTime.hashCode() : 0); hash = 89 * hash (this.getPostSupport != null ? this.getPostSupport.hashCode() : 0); hash = 89 * hash (this.responseSpeed != null ? this.responseSpeed.hashCode() : 0); return hash; } @Override public String toString() { return "ipAddress = " ipAddress ", port = " port ", localtion = " location ", anonymousType = " anonymousType ", type = " type ", confirmTime = " confirmTime ", getPostSupport = " getPostSupport ", responseSpeed = " responseSpeed; } private String ipAddress; private int port; private String location; private String anonymousType; private String type; private String confirmTime; private String getPostSupport; private String responseSpeed;}

2.Vote.javapackage com.hust.grid.leesf.entrance;import java.util.Timer;import java.util.concurrent.BlockingQueue;import java.util.concurrent.LinkedBlockingQueue;import com.hust.grid.leesf.bean.IpInfo;import com.hust.grid.leesf.thread.IPCollectTask;import com.hust.grid.leesf.thread.VoteThread;public class Vote { private BlockingQueue>IpInfo< ipInfoQueue; private IPCollectTask ipCollectTask; private VoteThread voteThread; public Vote() { ipInfoQueue = new LinkedBlockingQueue>IpInfoIpInfo< ipInfoQueue; // 联接经营者与顾客的阻塞队列 private List>IpInfo< historyIpLists; // 纪录早已获得的ip信息内容 public IPCollectTask(BlockingQueue>IpInfo< ipInfoQueue) { this.ipInfoQueue = ipInfoQueue; this.historyIpLists = new ArrayList>IpInfo trLists.size(); i ) {#p#分页标题#e# if ((i % 22 == 0) || (i % 22 == 1)) { // 除掉不满足条件的项 continue; } ele = trLists.get(i); Elements childrenList = ele.children(); String ipAddress = childrenList.get(1).text(); int port = Integer.parseInt(childrenList.get(2).text()); String location = childrenList.get(3).text(); String anonymousType = childrenList.get(4).text(); String type = childrenList.get(5).text(); String confirmTime = childrenList.get(6).text(); IpInfo ipInfo = new IpInfo(ipAddress, port, location,

网站友情链接: 微信投票