极验验证码破解思路
1.背景
最近整理以前的文件,发了一篇有意思的关于极验验证码破解思路的文章。现在回过头来思考感觉挺有意思的,分享给大家。
百度百科对极验的定义如下:
极验验证是一种在计算机领域用于区分自然人和机器人的,通过简单集成的方式,为
开发者提供安全、便捷的云端验证服务。与以往传统验证码不同的是,
极验通过分析用户完成拼图过程中的行为特征,
通过数据分析来判断是人还是机器。用户不必面对眼花缭乱的英文字符或汉字,整个验证过程变的像游戏一样有趣。
2.思路
第1步:
破解极验的思路主要是研究它的js以及分析拦截的http请求,通过研究发现访问如下截图1的url,就可以得到两张图片,解析出两张图片的名称,假设为bg和slice。
图2可以理解为bg图片,图2的图片有一部分阴影;图3可以理解为slice图片,切出来的图片是乱码,这些乱码图片需要通过css切图代码才能还原。css的切片代码见如下,把代码中的$$$$$$$$$$$替换为我们解析出的名称,就能拼凑出如下的完整图片。
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <style type="text/css"> <!-- .gt_info,.gt_info .gt_info_tip,.gt_info .info_wait,.gt_info .info_complete,.gt_info .info_error,.gt_info .info_abuse,.gt_info .info_forbidden,.gt_info .info_revalidate,.gt_ads_box_bg,.gt_bottom,.gt_ads_holder_top,.gt_ads_anim,.gt_refresh_button,.gt_refresh_button:hover,.gt_help_button,.gt_help_button:hover,.gt_slider_holder,.gt_slider_knob,.knob_active,.knob_normal,.gt_slider_knob:hover,.gt_refresh_tips,.gt_help_tips,.gt_ads_tips,.gt_ajax_tip,.ajax_lock,.ajax_pass,.ajax_error,.ajax_wait,.ajax_robot,.ajax_revalidate,.gt_popup .gt_form_header,.gt_popup .gt_bottom,.gt_popup .gt_form_header_0,.gt_popup .gt_form_header_1,.gt_popup .gt_form_header_close{background-repeat:no-repeat;background-image:url('http://static.geetest.com/static/golden/sprite.2.9.10.png');_background-image:url('http://static.geetest.com/static/golden/sprite.2.9.10.gif')}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info,.gt_info .gt_info_tip,.gt_info .info_wait,.gt_info .info_complete,.gt_info .info_error,.gt_info .info_abuse,.gt_info .info_forbidden,.gt_info .info_revalidate,.gt_ads_box_bg,.gt_bottom,.gt_ads_holder_top,.gt_ads_anim,.gt_refresh_button,.gt_refresh_button:hover,.gt_help_button,.gt_help_button:hover,.gt_slider_holder,.gt_slider_knob,.knob_active,.knob_normal,.gt_slider_knob:hover,.gt_refresh_tips,.gt_help_tips,.gt_ads_tips,.gt_ajax_tip,.ajax_lock,.ajax_pass,.ajax_error,.ajax_wait,.ajax_robot,.ajax_revalidate,.gt_popup .gt_form_header,.gt_popup .gt_bottom,.gt_popup .gt_form_header_0,.gt_popup .gt_form_header_1,.gt_popup .gt_form_header_close{background-image:url('http://static.geetest.com/static/golden/sprite2x.2.9.10.png');-moz-background-size:290px auto;-o-background-size:290px auto;-webkit-background-size:290px auto;background-size:290px auto}}.gt_info{height:22px;width:260px;background-position:0 -357px;height:0;overflow:hidden;position:absolute;bottom:1px;margin-left:1px;-webkit-transition:height 200ms;-moz-transition:height 200ms;-o-transition:height 200ms;transition:height 200ms}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info{background-position:0 -357px}}.gt_info .gt_info_tip{height:22px;width:260px;background-position:0 -676px;color:green;font-size:12px;font-weight:bold;line-height:23px;font-family:Helvetica, Arial, sans-serif !important;margin:0 auto;position:relative}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info .gt_info_tip{background-position:0 -676px}}.gt_info .info_wait{height:22px;width:260px;background-position:0 -676px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info .info_wait{background-position:0 -676px}}.gt_info .info_complete{height:22px;width:260px;background-position:0 -738px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info .info_complete{background-position:0 -738px}}.gt_info .info_error{height:22px;width:260px;background-position:0 -800px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info .info_error{background-position:0 -800px}}.gt_info .info_abuse{height:22px;width:260px;background-position:0 -822px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info .info_abuse{background-position:0 -822px}}.gt_info .info_forbidden{height:22px;width:260px;background-position:0 -844px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info .info_forbidden{background-position:0 -844px}}.gt_info .info_revalidate{height:22px;width:260px;background-position:0 -866px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_info .info_revalidate{background-position:0 -866px}}.gt_widget{opacity:1}.gt_widget.transition{-webkit-transition:opacity 0.5s ease-in-out;-moz-transition:opacity 0.5s ease-in-out;-o-transition:opacity 0.5s ease-in-out;transition:opacity 0.5s ease-in-out}.gt_ads_box{border:1px solid #e2d7c7;height:100%;width:260px;overflow:hidden;background-color:#fcfbf8;text-align:center;position:relative}.gt_ads_box_bg{height:62px;width:130px;background-position:0 -379px;position:absolute;top:50%;left:50%;margin-top:-30px;margin-left:-60px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_ads_box_bg{background-position:0 -379px}}.gt_ads{width:260px;height:100%;display:block;position:relative;-webkit-background-size:260px auto;-moz-background-size:260px auto;background-size:260px auto}.gt_ads_cut,.gt_ads_fullbg{position:absolute;left:0px;top:0px;width:261px;height:115px}.gt_ads_cut.hide,.gt_ads_fullbg.hide{display:none}.gt_ads_fullbg_slice,.gt_ads_cut_slice{float:left;width:10px;height:50%}.gt_ads_bg{width:260px;height:100%;top:-100%;display:block !important;position:relative;opacity:1;filter:alpha(opacity=100);-webkit-background-size:260px auto;-moz-background-size:260px auto;background-size:260px auto}.gt_ads_bg.transition{-webkit-transition:opacity 0.5s ease-in-out;-moz-transition:opacity 0.5s ease-in-out;-o-transition:opacity 0.5s ease-in-out;transition:opacity 0.5s ease-in-out}.gt_ads_bg.hide{opacity:0;filter:alpha(opacity=0);_display:none;z-index:-1\9}.gt_ads_holder{width:260px;height:90px;padding:0 15px 2px 13px;position:relative;background-color:#f2ece1;border-left:1px solid #e4ddd1;border-right:1px solid #e4ddd1;_margin-top:-5px;_padding:0 13px 0 13px;box-sizing:content-box;-webkit-box-sizing:content-box}.gt_bottom{height:28px;width:290px;background-position:0 -28px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_bottom{background-position:0 -28px}}.gt_ads_holder_top{height:14px;width:290px;background-position:0 -936px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_ads_holder_top{background-position:0 -936px}}.gt_holder{position:relative;width:300px}.gt_input_holder{display:none}.gt_ads_anim{*display:none;height:92px;width:167px;background-position:0 -216px;left:261px;top:0;position:absolute}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_ads_anim{background-position:0 -216px}}.gt_ads_anim.transition{-webkit-transition:left 0.5s ease-in-out;-moz-transition:left 0.5s ease-in-out;-o-transition:left 0.5s ease-in-out;transition:left 0.5s ease-in-out}.gt_info_time{position:absolute;left:87px}.gt_info_text{position:absolute;left:183px}.gt_info_forbidden{position:absolute;left:193px}.gt_button_holder{text-align:left;padding:7px 0 0 18px;height:20px;line-height:14px !important;position:relative}.gt_button_holder a{display:block;zoom:1;display:inline-block;overflow:hidden;cursor:pointer;margin-right:16px}.gt_refresh_button{background-color:#f1e9de;-webkit-tap-highlight-color:transparent;height:14px;width:14px;background-position:0 -596px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_refresh_button{background-position:0 -596px}}.gt_refresh_button:hover{height:14px;width:14px;background-position:0 -610px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_refresh_button:hover{background-position:0 -610px}}.gt_help_button{background-color:#f1e9de;-webkit-tap-highlight-color:transparent;height:14px;width:14px;background-position:0 -329px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_help_button{background-position:0 -329px}}.gt_help_button:hover{height:14px;width:14px;background-position:0 -343px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_help_button:hover{background-position:0 -343px}}.gt_logo_button{width:65px;height:14px;position:absolute;right:0;background-color:transparent}.gt_logo_button.no_logo{background-color:#f2ece1;cursor:default}a.gt_ad_link{font-size:12px !important;color:#8a8887 !important;font-family:SimSun, monospace !important;position:absolute;right:0;margin-right:0}a.gt_ad_link:hover{text-decoration:underline !important}.gt_slider_holder{height:28px;width:261px;background-position:0 0;position:relative}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_slider_holder{background-position:0 0}}.gt_slider_knob{height:26px;width:60px;background-position:0 -56px;background-color:transparent !important;cursor:pointer;display:block;position:absolute;left:0;top:1px;-moz-box-shadow:none;box-shadow:none;border-radius:13px;-webkit-tap-highlight-color:transparent}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_slider_knob{background-position:0 -56px}}.gt_slider_knob.fallback{-webkit-transition:-webkit-transform 0.4s ease-in,left 0.4s ease-in;-moz-transition:-moz-transform 0.4s ease-in,left 0.4s ease-in;-o-transition:-o-transform 0.4s ease-in,left 0.4s ease-in;transition:transform 0.4s ease-in,left 0.4s ease-in}.knob_active{height:26px;width:60px;background-position:0 -82px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.knob_active{background-position:0 -82px}}.knob_normal{height:26px;width:60px;background-position:0 -56px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.knob_normal{background-position:0 -56px}}.gt_slider_knob:hover{height:26px;width:60px;background-position:0 -82px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_slider_knob:hover{background-position:0 -82px}}.gt_ads_slice{position:absolute;left:0;width:48px;height:64px;background-repeat:no-repeat;-webkit-transition:opacity 0.1s ease-in-out;-moz-transition:opacity 0.1s ease-in-out;-o-transition:opacity 0.1s ease-in-out;transition:opacity 0.1s ease-in-out}.gt_ads_slice.fallback{-webkit-transition:-webkit-transform 0.4s ease-in,left 0.4s ease-in;-moz-transition:-moz-transform 0.4s ease-in,left 0.4s ease-in;-o-transition:-o-transform 0.4s ease-in,left 0.4s ease-in;transition:transform 0.4s ease-in,left 0.4s ease-in}.gt_ads_slice.long{-webkit-transition:opacity 0.5s ease-in-out;-moz-transition:opacity 0.5s ease-in-out;-o-transition:opacity 0.5s ease-in-out;transition:opacity 0.5s ease-in-out}.gt_ads_slice.zoom{margin-top:-3px;-webkit-transition:-webkit-transform 0.6s ease-in-out, opacity 0.6s, margin 0.6s;transition:transform 0.6s ease-in-out, opacity 0.6s, margin 0.6s}.gt_tips{top:-21px;left:6px;position:absolute}.gt_tips a,.gt_tips div{display:none}.gt_refresh_tips{height:24px;width:58px;background-position:0 -888px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_refresh_tips{background-position:0 -888px}}.gt_help_tips{left:31px;position:relative;height:24px;width:70px;background-position:0 -912px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_help_tips{background-position:0 -912px}}.gt_ads_tips{height:16px;width:73px;background-position:0 -467px;display:none;position:absolute;right:0;bottom:0;opacity:0.7;filter:alpha(opacity=70);zoom:1}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_ads_tips{background-position:0 -467px}}.gt_guide_tip{position:absolute;left:87px;font-family:SimSun, monospace !important;font-size:12px !important;color:#b6a998;opacity:1;height:28px;line-height:28px !important;-webkit-transition:opacity 0.5s ease-in-out;-moz-transition:opacity 0.5s ease-in-out;-o-transition:opacity 0.5s ease-in-out;transition:opacity 0.5s ease-in-out}.gt_guide_tip a{text-decoration:none;color:#b6a998}.gt_ajax_tip{width:22px;height:24px;position:absolute;right:-16px;bottom:0;height:26px;width:26px;background-position:0 -441px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_ajax_tip{background-position:0 -441px}}.ajax_lock{height:26px;width:26px;background-position:0 -441px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.ajax_lock{background-position:0 -441px}}.ajax_pass{height:26px;width:26px;background-position:0 -134px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.ajax_pass{background-position:0 -134px}}.ajax_error{height:26px;width:26px;background-position:0 -190px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.ajax_error{background-position:0 -190px}}.ajax_wait{height:26px;width:26px;background-position:0 -108px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.ajax_wait{background-position:0 -108px}}.ajax_robot{height:26px;width:26px;background-position:0 -650px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.ajax_robot{background-position:0 -650px}}.ajax_revalidate{height:26px;width:26px;background-position:0 -624px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.ajax_revalidate{background-position:0 -624px}}.float .gt_ajax_tip{right:10px}.embed .gt_slider_holder{left:18px}.gt_popup .gt_form_header{height:41px;width:288px;background-position:0 -555px;position:relative;height:40px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_popup .gt_form_header{background-position:0 -555px}}.gt_popup .gt_bottom{height:72px;width:288px;background-position:0 -483px}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_popup .gt_bottom{background-position:0 -483px}}.gt_popup .gt_form_header_0{height:40px;width:288px;background-position:0 -698px;position:relative}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_popup .gt_form_header_0{background-position:0 -698px}}.gt_popup .gt_form_header_1{height:40px;width:288px;background-position:0 -760px;display:none;position:relative;padding-left:81px;line-height:42px;color:#55b72f;font-weight:bold}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_popup .gt_form_header_1{background-position:0 -760px}}.gt_popup .gt_form_header_close{height:30px;width:30px;background-position:0 -160px;position:absolute;top:6px;right:5px;cursor:pointer}@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 192dpi), (min-resolution: 1.5dppx){.gt_popup .gt_form_header_close{background-position:0 -160px}}.gt_popup .gt_slider_holder{left:14px;top:4px}.gt_popup .gt_button_holder a{background-color:white}.gt_popup .gt_button_holder a.gt_logo_button{background-color:transparent;width:65px;height:16px}.gt_popup .gt_button_holder a.gt_logo_button.no_logo{background-color:white}.gt_popup .gt_ads_holder{padding:13px 15px 2px 11px;background-color:#fff;overflow:hidden;_padding:13px 14px 2px 12px}.gt_popup .gt_ads_tips{bottom:-1px}.gt_popup{position:fixed;margin-left:-144px;margin-top:-108px;top:50%;left:50%;display:none;_position:absolute;opacity:0;-webkit-transition:opacity 400ms;-moz-transition:opacity 400ms;-ms-transition:opacity 400ms;-o-transition:opacity 400ms;transition:opacity 400ms}.gt_mask{position:fixed;width:100%;height:100%;top:0;left:0;background-color:black;opacity:0;filter:alpha(opacity=60);display:none;-webkit-transition:opacity 400ms;-moz-transition:opacity 400ms;-ms-transition:opacity 400ms;-o-transition:opacity 400ms;transition:opacity 400ms}.gt_hide_ie{left:-1000px !important}.gt_hide{opacity:0;filter:alpha(opacity=0)} --> </style> </head> <body> <div class="gt_ads_cut"> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -157px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -145px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -265px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -277px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -181px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -169px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -241px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -253px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -109px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -97px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -289px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -301px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -85px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -73px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -25px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -37px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -13px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -1px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -121px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -133px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -61px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -49px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -217px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -229px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -205px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -193px -58px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -145px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -157px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -277px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -265px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -169px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -181px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -253px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -241px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -97px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -109px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -301px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -289px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -73px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -85px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -37px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -25px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -1px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -13px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -133px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -121px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -49px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -61px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -229px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -217px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -193px 0px;"></div> <div class="gt_ads_cut_slice" style="background-image: url(http://static.geetest.com/$$$$$$$$$$$); background-position: -205px 0px;"></div> </div> </body> </html>
第2步:
图片拿到后,我们就只需要获取点位轨迹即可,获取轨迹的方式一种是使用程序随机模拟坐标,这种方式准确率不高,容易被识别为机器人。另一种方式是手动多拖几百次,采集出坐标点,把这些坐标点进行微小变动拼凑出来。
第3步:
采集到坐标点后,就需要通过Microsoft.JScript.Vsa;引擎调用JS方法userresponse产生用户行为,调用pushPoint添加坐标点,调用f()方法产线加密的拖动轨迹。
var allpoint = []; function c(a) { for (var b = [ ], c = 0; c < a.length - 1; c++) { var d = [ ]; d[0] = Math.round(a[c + 1][0] - a[c][0]), d[1] = Math.round(a[c + 1][1] - a[c][1]), d[2] = Math.round(a[c + 1][2] - a[c][2]), (0 !== d[0] || 0 !== d[1] || 0 !== d[2]) && b.push(d) } return b }; function d(a) { var b = '()*,-./0123456789:?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqr', c = b.length, d = '', e = Math.abs(a), f = parseInt(e / c); f >= c && (f = c - 1), f && (d = b.charAt(f)), e %= c; var g = ''; return 0 > a && (g += '!'), d && (g += '$'), g + d + b.charAt(e) }; function e(a) { for (var b = [ [1, 0], [ 2, 0 ], [ 1, -1 ], [ 1, 1 ], [ 0, 1 ], [ 0, -1 ], [ 3, 0 ], [ 2, -1 ], [ 2, 1 ] ], c = 'stuvwxyz~', d = 0, e = b.length; e > d; d++) if (a[0] == b[d][0] && a[1] == b[d][1]) return c[d]; return 0 }; function f() { for (var b, f = c(allpoint), g = [ ], h = [ ], i = [ ], j = 0, k = f.length; k > j; j++) b = e(f[j]), b ? h.push(b) : (g.push(d(f[j][0])), h.push(d(f[j][1]))), i.push(d(f[j][2])); var tt = g.join('') + '!!' + h.join('') + '!!' + i.join(''); return tt; }; function pushPoint(x, y, time) { allpoint.push([x, y, time]); } function gettrack() { return f(); }; function createtime() { return parseInt(10000 * Math.random()) + (new Date).valueOf() }; function userresponse(a, b) { for (var c = b.slice(32), d = [ ], e = 0; e < c.length; e++) { var f = c.charCodeAt(e); d[e] = f > 57 ? f - 87 : f - 48 } c = 36 * d[0] + d[1]; var g = Math.round(a) + c; b = b.slice(0, 32); var h, i = [ [], [ ], [ ], [ ], [ ] ], j = { }, k = 0; e = 0; for (var l = b.length; l > e; e++) h = b.charAt(e), j[h] || (j[h] = 1, i[k].push(h), k++, k = 5 == k ? 0 : k); for (var m, n = g, o = 4, p = '', q = [ 1, 2, 5, 10, 50 ]; n > 0; ) n - q[o] >= 0 ? (m = parseInt(Math.random() * i[o].length, 10), p += i[o][m], n -= q[o]) : (i.splice(o, 1), q.splice(o, 1), o -= 1); return p };
第4步:
提交拼凑出的url。
关注公众号了解更多