鼠标模拟破解手势验证码
By
admin
at 2017-12-10 • 0人收藏 • 1953人看过
import win.ui;
/*DSG{{*/
var winform = win.form(text="鼠标画线";right=349;bottom=163;parent=...)
winform.add(
button2={cls="button";text="记录ctrl+P / 执行Ctrl+O";left=44;top=59;right=314;bottom=98;z=1};
button3={cls="button";text="查看鼠标数组";left=42;top=110;right=309;bottom=149;z=2}
)
/*}}*/
import mouse;
import mouse.draw;
var hkId1,hkId2,hkId3;
var keytab = {};
winform.button2.oncommand = function(id,event){
winform.unreghotkey(hkId1);
winform.unreghotkey(hkId2);
winform.unreghotkey(hkId3);
hkId1 = winform.reghotkey(function(id,mod,vk){
var x,y = mouse.getPos();
table.push(keytab,{["x"]=x;["y"]=y});
},0x2/*_MOD_CONTROL*/,'P'#);
hkId2 = winform.reghotkey(function(id,mod,vk){
mouse.move(keytab[1].x,keytab[1].y,true);
win.delay(1000)
mouse.down();
for(i=2;#keytab;1){
var bj = math.round(300,900);
mouse.delayMove = bj;
mouse.moveTo(keytab[i].x,keytab[i].y,true)
//mouse.drag(keytab[i].x,keytab[i].y,true)
//mouse.draw.line(keytab[i].x,keytab[i].y,keytab[i+1].x,keytab[i+1].y);
//win.delay(10)
sleep(bj)
}
mouse.up();
table.remove(keytab);
keytab = {};
},0x2/*_MOD_CONTROL*/,'O'#);
hkId3 = winform.reghotkey(function(id,mod,vk){
table.remove(keytab);
},0x2/*_MOD_CONTROL*/,'L'#);
}
winform.button3.oncommand = function(id,event){
import console;
console.open()
console.dump(keytab)
}
winform.show()
win.loopMessage();就是简单的利用鼠标移动产生要给手势, 关键是那个随机移动速度和停顿速度
手势验证码示例demo网:vaptcha.com/demo

登录后方可回帖