小波哥哥叫帮忙投票的网站有验证码,从网站下载的发送post包刷票的软件不能直接使用。所以写了这个脚本。
通过大漠插件识别验证码,输入后模拟鼠标点击投票。
字库文件内容(bobo.txt):
F01E020040080701E0F43C9E1783C0700800$7$0.0.50$13
7FFFFF18670CC198718B1F21E$6$0.0.69$13
18270DC1F07C1D8738C3B81E0180$2$1.0.65$13
7C1FFF1FE38C618E5FF9EF0C0$8$0.0.69$13
FE1FC2184308610C21843083307C078$5$0.0.63$13
01C0F87F066FFFFFC03006004$4$0.0.50$13
18270DC1F07C1D8730C3F83E0080$2$1.0.65$13
7E3FE70660CC398671CBFF3FE$9$0.0.72$13
00700600C619C17C3D8F31C3F07C060$3$0.0.60$13
00700600C619C17C3D8F31C3707C070$3$0.0.60$13
701FFFFF8$1$1.3.38$13
F01E020040080701E0F43C9E1783C0700$7$0.0.49$13
7FFFFF00E00C0180300BFF3FE$0$0.0.65$13
按键源码:
//绑定web按键
Call Plugin.Web.Bind("wqm.exe")
Call Plugin.Web.Go("投票网址")
Call Plugin.Web.SetSize(1024,800)
//绑定大漠插件
Set dm = createobject("dm.dmsoft")
dm.SetPath ("d:")
dm_ret = dm.SetDict(0, "bobo.txt")
hwnd = dm.GetMousePointWindow()
Delay 1000
dm_ret = dm.BindWindow(hwnd, "dx2", "windows", "windows", 0)
Rem 投票
//记录时间和IP地址
Call Plugin.Web.ClearTemp
IPa = Lib.网络.获得外网IP地址()
Tim = Plugin.GetSysInfo.GetDateTime()
Call Plugin.File.WriteFileEx("d:\log.txt", Tim & " " &IPa)
//投票网址
Call Plugin.Web.Go("投票网址")
//选择投票人
Call Plugin.Web.HtmlClick("type:checkbox&value:83")
Delay 100
//识别验证码并输入
s = dm.Ocr(490, 461, 556, 490, "000000-000000", 1.0)
Call Plugin.Web.HtmlInput(s, "id:code")
Delay 100
//确认投票
Call Plugin.Web.HtmlClick("tag:INPUT&value:确认投票")
Delay 1500
//确定按钮
KeyPress "Space", 1
Delay 100
KeyPress "Space", 1
Delay 100
KeyPress "Space", 1
//确定按钮后台实现方案(验证无效)
//hwnd1 = dm.FindWindow("", "来自网页的消息")
//dm_ret = dm.BindWindow(hwnd1, "dx", "normal", "normal", 0)
//dm.KeyPress 32
//断网
Plugin.Net.HangUp
Delay 200
//拨号
Rem 拨号
OnLine = Plugin.Net.DialUp("ADSL")
If OnLine = False Then
Delay 1000
Goto 拨号
Else
Goto 投票
End If