Skip to content

Instantly share code, notes, and snippets.

@quake
Created May 15, 2014 07:45
Show Gist options
  • Save quake/50ce556917593b705aae to your computer and use it in GitHub Desktop.
Save quake/50ce556917593b705aae to your computer and use it in GitHub Desktop.
/*
破解 http://geetest.com/tryit/
打开浏览器在console里面运行如下代码
加载jquery模拟drag脚本,考虑到滑块大小,第一次直接拖动到50px,后续每秒钟拖动8px
从人工拖动的结果可以看出,该验证码方式位置误差在+/- 5px左右,所以50px+8px这样简单粗暴的2行代码就可以有30%的成功率
破解失败情况是在滑块缺口位置偏右了,导致尝试太多
加上图像识别滑块缺口位置,就可以轻松100%地破解
*/
function d(first) {
$('.gt_slider_knob').simulate('drag', { dx: first ? 50 : 8 });
setTimeout(function(){d(false);}, 1000);
}
jQuery.getScript("https://raw.githubusercontent.com/jquery/jquery-ui/master/tests/jquery.simulate.js", function() {
d(true);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment