diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6041139 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +config.php +test +data +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip +*.as3 +*.yimian +*.dat diff --git a/README.md b/README.md index 3c3963b..221180c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ # easyVarCode -Provide an easy but elegant method to exclude a reboot for your website +yahoo! It can be unbelievably easy to fight with robots by including this Plugin~ + + +## What is easyVarCode? +easyVarCode is a friendly plugin which can help you expel robots which are trying to steal user infomation from your website.
+With the help of easyVarCode you can easily identify whether it is a robot who is visiting your website.
+Basing on easyVarCode, it becomes quick and convenient for users to finish their login process which can make your site more friendly. + + +## Quick start + +[Click here to see how it works!](https://cn.yimian.xyz/etc/easyVarCode/) + + +## How to use easyVarCode? +To use easyVarCode, you must include the easyVarCode.js first.
+The generated fingerprint is stored in global variabel fp.
+A simple example: +```html + + +``` + + diff --git a/easyVer.css.map b/easyVer.css.map new file mode 100644 index 0000000..374476e --- /dev/null +++ b/easyVer.css.map @@ -0,0 +1,20 @@ +.slider-btn{position:absolute;width:44px;height:44px;left:0;top:-7px;z-index:12;cursor:pointer;background-image:url(https://cdn.yimian.ac.cn/easyVarCode/css.png);background-position:0 -84px;transition:inherit} +.ver-tips{position:absolute;left:0;bottom:-22px;background:rgba(255,255,255,.9);height:22px;line-height:22px;font-size:12px;width:100%;margin:0;text-align:left;padding:0 8px;transition:all .4s} +.slider-tips{bottom:0} +.ver-tips i{display:inline-block;width:22px;height:22px;vertical-align:top;background-image:url(https://cdn.yimian.ac.cn/easyVarCode/css.png);background-position:-4px -1229px} +.ver-tips span{display:inline-block;vertical-align:top;line-height:22px;color:#455} +.active-tips{display:block} +.hidden{display:none} +.re-btn{position:absolute;left:0;bottom:0;height:28px;padding:0 16px} +.re-btn a{display:inline-block;width:14px;height:14px;margin:7px 0;background-image:url(https://cdn.yimian.ac.cn/easyVarCode/css.png);background-position:0 -1179px;cursor:pointer} +.re-btn a:hover{background-position:0 -1193px} .verBox { + position:absolute; + width:100%; + text-align:center; + left:404px; + top:0; + opacity:0; + transition:all 0.8s; + padding-top:55px; + z-index:9999; + } \ No newline at end of file diff --git a/easyVer.js.map b/easyVer.js.map new file mode 100644 index 0000000..831901a --- /dev/null +++ b/easyVer.js.map @@ -0,0 +1,247 @@ +function imgVer(Config) { + var el = eval(Config.el); + var w = Config.width; + var h = Config.height; + + var PL_Size = 48; + var padding = 20; + var MinN_X = padding + PL_Size; + var MaxN_X = w - padding - PL_Size - PL_Size / 6; + var MaxN_Y = padding; + var MinN_Y = h - padding - PL_Size - PL_Size / 6; + function RandomNum(Min, Max) { + var Range = Max - Min; + var Rand = Math.random(); + if (Math.round(Rand * Range) == 0) { + return Min + 1; + } else if (Math.round(Rand * Max) == Max) { + return Max - 1; + } else { + var num = Min + Math.round(Rand * Range) - 1; + return num; + } + } + + var imgSrc = "https://cdn.yimian.ac.cn/easyVer/image.php?df="+Math.floor(Math.random()*10); + var X = RandomNum(MinN_X, MaxN_X); + var Y = RandomNum(MinN_Y, MaxN_Y); + var left_Num = -X + 10; + var html = '
'; + html += '
'; + html += '
'; + html += ''; + html += ''; + html += '
'; + html += '
'; + html += ''; + html += ''; + html += '
'; + html += '

'; + html += '
'; + html += '
'; + html += '
'; + html += '
'; + html += '
'; + html += '
'; + html += '

Slide block to finish the jigsaw..

'; + html += '
'; + html += '
'; + html += '
'; + el.html(html); + var d = PL_Size / 3; + var c = document.getElementById("puzzleBox"); + var ctx = c.getContext("2d"); + ctx.globalCompositeOperation = "xor"; + ctx.shadowBlur = 10; + ctx.shadowColor = "#fff"; + ctx.shadowOffsetX = 3; + ctx.shadowOffsetY = 3; + ctx.fillStyle = "rgba(0,0,0,0.7)"; + ctx.beginPath(); + ctx.lineWidth = "1"; + ctx.strokeStyle = "rgba(0,0,0,0)"; + ctx.moveTo(X, Y); + ctx.lineTo(X + d, Y); + ctx.bezierCurveTo(X + d, Y - d, X + 2 * d, Y - d, X + 2 * d, Y); + ctx.lineTo(X + 3 * d, Y); + ctx.lineTo(X + 3 * d, Y + d); + ctx.bezierCurveTo(X + 2 * d, Y + d, X + 2 * d, Y + 2 * d, X + 3 * d, Y + 2 * d); + ctx.lineTo(X + 3 * d, Y + 3 * d); + ctx.lineTo(X, Y + 3 * d); + ctx.closePath(); + ctx.stroke(); + ctx.fill(); + var c_l = document.getElementById("puzzleLost"); + var c_s = document.getElementById("puzzleShadow"); + var ctx_l = c_l.getContext("2d"); + var ctx_s = c_s.getContext("2d"); + var img = new Image(); + img.src = imgSrc; + img.onload = function() { + ctx_l.drawImage(img, 0, 0, w, h); + } + ctx_l.beginPath(); + ctx_l.strokeStyle = "rgba(0,0,0,0)"; + ctx_l.moveTo(X, Y); + ctx_l.lineTo(X + d, Y); + ctx_l.bezierCurveTo(X + d, Y - d, X + 2 * d, Y - d, X + 2 * d, Y); + ctx_l.lineTo(X + 3 * d, Y); + ctx_l.lineTo(X + 3 * d, Y + d); + ctx_l.bezierCurveTo(X + 2 * d, Y + d, X + 2 * d, Y + 2 * d, X + 3 * d, Y + 2 * d); + ctx_l.lineTo(X + 3 * d, Y + 3 * d); + ctx_l.lineTo(X, Y + 3 * d); + ctx_l.closePath(); + ctx_l.stroke(); + ctx_l.shadowBlur = 10; + ctx_l.shadowColor = "black"; + ctx_l.clip(); + ctx_s.beginPath(); + ctx_s.lineWidth = "1"; + ctx_s.strokeStyle = "rgba(0,0,0,0)"; + ctx_s.moveTo(X, Y); + ctx_s.lineTo(X + d, Y); + ctx_s.bezierCurveTo(X + d, Y - d, X + 2 * d, Y - d, X + 2 * d, Y); + ctx_s.lineTo(X + 3 * d, Y); + ctx_s.lineTo(X + 3 * d, Y + d); + ctx_s.bezierCurveTo(X + 2 * d, Y + d, X + 2 * d, Y + 2 * d, X + 3 * d, Y + 2 * d); + ctx_s.lineTo(X + 3 * d, Y + 3 * d); + ctx_s.lineTo(X, Y + 3 * d); + ctx_s.closePath(); + ctx_s.stroke(); + ctx_s.shadowBlur = 20; + ctx_s.shadowColor = "black"; + ctx_s.fill(); + var moveStart = ''; + $(".slider-btn").mousedown(function(e) { + e = e || window.event; + $(this).css({ + "background-position": "0 -216px" + }); + moveStart = e.pageX; + }); + onmousemove = function(e) { + e = e || window.event; + var moveX = e.pageX; + var d = moveX - moveStart; + if (moveStart == '') {} else { + if (d < 0 || d > (w - padding - PL_Size)) {} else { + $(".slider-btn").css({ + "left": d + 'px', + "transition": "inherit" + }); + $("#puzzleLost").css({ + "left": d + 'px', + "transition": "inherit" + }); + $("#puzzleShadow").css({ + "left": d + 'px', + "transition": "inherit" + }); + } + } + }; + onmouseup = function(e) { + e = e || window.event; + var moveEnd_X = e.pageX - moveStart; + var ver_Num = X - 10; + var deviation = 4; + var Min_left = ver_Num - deviation; + var Max_left = ver_Num + deviation; + if (moveStart == '') {} else { + if (Max_left > moveEnd_X && moveEnd_X > Min_left) { + $(".ver-tips").html('Authority Confimed!'); + $(".ver-tips").addClass("slider-tips"); + $(".puzzle-lost-box").addClass("hidden"); + $("#puzzleBox").addClass("hidden"); + setTimeout(function() { + $(".ver-tips").removeClass("slider-tips"); + imgVer(Config);easyVer_off(); + }, + 2000); + + Config.success(); + } else { + $(".ver-tips").html('Verification Failure!Please drag block to the right position!'); + $(".ver-tips").addClass("slider-tips"); + setTimeout(function() { + $(".ver-tips").removeClass("slider-tips"); + document.getElementById("scream").src="https://cdn.yimian.ac.cn/easyVer/image.php?df="+Math.floor(Math.random()*10); + imgVer(Config); + }, + 2000); + + Config.error(); + } + } + setTimeout(function() { + $(".slider-btn").css({ + "left": '0', + "transition": "left 0.5s" + }); + $("#puzzleLost").css({ + "left": '0', + "transition": "left 0.5s" + }); + $("#puzzleShadow").css({ + "left": '0', + "transition": "left 0.5s" + }); + }, + 1000); + $(".slider-btn").css({ + "background-position": "0 -84px" + }); + moveStart = ''; + $(".re-btn a").on("click", + function() { + imgVer(Config); + }) + + } +} + + var callBackFunctionName=""; + + $(".verBox").html("
"); + + $(".ver").on('click',function () { + $(".verBox").css({ + "left":"0", + "opacity":"1" + }) + + }); + + + function easyVer() + { + imgVer({ + el:'$("#imgVer")', + width:'260', + height:'116', + success:function () { + + $(".verBox").css({ + "left":"404px", + "opacity":"0" + }); + $(".verBox").css({ + "left":"0", + "opacity":"1" + }); + + if(callBackFunctionName)eval(callBackFunctionName+"()"); + }, + error:function () { + } + }); + } + + + function easyVer_off() + { + $(".verBox").css({ + "left":"404px", + "opacity":"0" + }); + } \ No newline at end of file diff --git a/easyVer.min.css b/easyVer.min.css new file mode 100644 index 0000000..832e6cd --- /dev/null +++ b/easyVer.min.css @@ -0,0 +1 @@ +.slider-btn{position:absolute;width:44px;height:44px;left:0;top:-7px;z-index:12;cursor:pointer;background-image:url(https://cdn.yimian.ac.cn/easyVarCode/css.png);background-position:0 -84px;transition:inherit}.ver-tips{position:absolute;left:0;bottom:-22px;background:rgba(255,255,255,.9);height:22px;line-height:22px;font-size:12px;width:100%;margin:0;text-align:left;padding:0 8px;transition:all .4s}.slider-tips{bottom:0}.ver-tips i{display:inline-block;width:22px;height:22px;vertical-align:top;background-image:url(https://cdn.yimian.ac.cn/easyVarCode/css.png);background-position:-4px -1229px}.ver-tips span{display:inline-block;vertical-align:top;line-height:22px;color:#455}.active-tips{display:block}.hidden{display:none}.re-btn{position:absolute;left:0;bottom:0;height:28px;padding:0 16px}.re-btn a{display:inline-block;width:14px;height:14px;margin:7px 0;background-image:url(https://cdn.yimian.ac.cn/easyVarCode/css.png);background-position:0 -1179px;cursor:pointer}.re-btn a:hover{background-position:0 -1193px}.verBox{position:absolute;width:100%;text-align:center;left:404px;top:0;opacity:0;transition:all 0.8s;padding-top:55px;z-index:9999;} \ No newline at end of file diff --git a/easyVer.min.js b/easyVer.min.js new file mode 100644 index 0000000..2b92f7d --- /dev/null +++ b/easyVer.min.js @@ -0,0 +1,7 @@ +function imgVer(Config) {eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('5 E=1a(B.E);5 w=B.b;5 h=B.f;5 g=18;5 i=20;5 13=i+g;5 K=w-i-g-g/6;5 O=i;5 H=h-i-g-g/6;1d D(v,m){5 F=m-v;5 x=j.Z();Q(j.G(x*F)==0){C v+1}V Q(j.G(x*m)==m){C m-1}V{5 11=v+j.G(x*F)-1;C 11}}5 P="15://1o.1n.1p.1q/1l/1f.1h?1j="+j.1i(j.Z()*10);5 X=D(13,K);5 Y=D(H,O);5 I=-X+10;5 4=\'<7 8="e:n;i:A A S;r:o N #1k;M:#1e;r-J:A;">\';4+=\'<7 8="e:n;1g:1r;b:\'+w+\'9;">\';4+=\'<7 8="e:n;b:\'+w+\'9;f:\'+h+\'9;">\';4+=\'<1s l="1m" 17="\'+P+\'" 8="b:\'+w+\'9;f:\'+h+\'9;">\';4+=\'\';4+=\'\';4+=\'<7 l="14" y="16-1b-L" 8="e:s;b:\'+w+\'9;f:\'+h+\'9;t:0;u:\'+I+\'9;z-q:1c;">\';4+=\'\';4+=\'\';4+=\'\';4+=\'

\';4+=\'\';4+=\'<7 y="1V-U">\';4+=\'\';4+=\'<1Q>\';4+=\'<7 8="e:n;b:\'+w+\'9;R:1P;">\';4+=\'<7 8="r:o N #1S;r-J:1R;M:#1X;L-1Z:0 o o 1Y(12,10,10,0.2) 1A;">\';4+=\'

1w 1L 1K 1M 1O 1N..

\';4+=\'\';4+=\'<7 y="1J-U">\';4+=\'\';E.4(4);5 d=g/3;5 c=1F.1E("W");5 1G=c.1I("1H");',62,127,'||||html|var||div|style|px||width|||position|height|PL_Size||padding|Math|canvas|id|Max|relative|1px||index|border|absolute|top|left|Min||Rand|class||16px|Config|return|RandomNum|el|Range|round|MinN_Y|left_Num|radius|MaxN_X|box|background|solid|MaxN_Y|imgSrc|if|margin|28px|right|btn|else|puzzleBox|||random||num||MinN_X|kuang|https|puzzle|src|48|puzzleShadow|eval|lost|111|function|f2ece1|image|overflow|php|floor|df|ddd|easyVer|scream|yimian|cdn|ac|cn|hidden|img|text|line|align|Slide|22px|486c80|font|inset|size|color|12px|getElementById|document|ctx|2d|getContext|slider|to|block|finish|jigsaw|the|auto|br|24px|c3c3c3|tips|ver|re|33|ece4dd|rgba|shadow||puzzleLost|'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('2.h="a";2.b=c;2.9="#5";2.8=3;2.6=3;2.e="4(0,0,0,0.7)";2.d();2.g="1";2.f="4(0,0,0,0)";',18,18,'||ctx||rgba|fff|shadowOffsetY||shadowOffsetX|shadowColor|xor|shadowBlur|10|beginPath|fillStyle|strokeStyle|lineWidth|globalCompositeOperation'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('5.8(4,1);5.6(4+0,1);5.7(4+0,1-0,4+2*0,1-0,4+2*0,1);5.6(4+3*0,1);5.6(4+3*0,1+0);5.7(4+2*0,1+0,4+2*0,1+2*0,4+3*0,1+2*0);5.6(4+3*0,1+3*0);5.6(4,1+3*0);',9,9,'d|Y|||X|ctx|lineTo|bezierCurveTo|moveTo'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('3.n();3.b();3.c();1 4=a.5("e");1 6=a.5("d");1 9=4.7("8");1 f=6.7("8");1 2=m p();2.o=l;2.i=g(){9.k(2,0,0,j,h)}',26,26,'|var|img|ctx|c_l|getElementById|c_s|getContext|2d|ctx_l|document|stroke|fill|puzzleShadow|puzzleLost|ctx_s|function||onload|w|drawImage|imgSrc|new|closePath|src|Image'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('7.b();7.e="c(0,0,0,0)";7.f(5,4);7.8(5+d,4);7.9(5+d,4-d,5+2*d,4-d,5+2*d,4);7.8(5+3*d,4);7.8(5+3*d,4+d);7.9(5+2*d,4+d,5+2*d,4+2*d,5+3*d,4+2*d);7.8(5+3*d,4+3*d);7.8(5,4+3*d);7.h();7.i();7.g=k;7.j="a";7.m();6.b();6.l="1";6.e="c(0,0,0,0)";6.f(5,4);6.8(5+d,4);6.9(5+d,4-d,5+2*d,4-d,5+2*d,4);6.8(5+3*d,4);6.8(5+3*d,4+d);6.9(5+2*d,4+d,5+2*d,4+2*d,5+3*d,4+2*d);6.8(5+3*d,4+3*d);6.8(5,4+3*d);6.h();6.i();6.g=n;6.j="a";6.o();',25,25,'||||Y|X|ctx_s|ctx_l|lineTo|bezierCurveTo|black|beginPath|rgba||strokeStyle|moveTo|shadowBlur|closePath|stroke|shadowColor|10|lineWidth|clip|20|fill'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('6 1=\'\';$(".7-8").5(2(e){e=e||4.3;$(9).d({"f-c":"0 -b"});1=e.a});',16,16,'|moveStart|function|event|window|mousedown|var|slider|btn|this|pageX|216px|position|css||background'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('N=8(e){e=e||H.G;6 C=e.E;6 d=C-g;h(g==\'\'){}m{h(d<0||d>(w-Z-Y)){}m{$(".5-j").7({"1":d+\'v\',"9":"s"});$("#J").7({"1":d+\'v\',"9":"s"});$("#L").7({"1":d+\'v\',"9":"s"})}}};V=8(e){e=e||H.G;6 q=e.E-g;6 o=X-10;6 p=4;6 z=o-p;6 K=o+p;h(g==\'\'){}m{h(K>q&&q>z){$(".b-2").D(\'<3 f="A:#U;">S T!<3>\');$(".b-2").k("5-2");$(".12-13-11").k("y");$("#R").k("y");r(8(){$(".b-2").B("5-2");t(c);M()},I);c.Q()}m{$(".b-2").D(\'<3 f="A:O;">1k 1o!<3 f="1p-1:n;">1q 1n 1l 1m 1x 1w l!\');$(".b-2").k("5-2");r(8(){$(".b-2").B("5-2");1v.1s("1r").1u="1t://1j.18.19.1a/17/14.15?16="+F.1b(F.1g()*10);t(c)},I);c.1h()}}r(8(){$(".5-j").7({"1":\'0\',"9":"1 0.u"});$("#J").7({"1":\'0\',"9":"1 0.u"});$("#L").7({"1":\'0\',"9":"1 0.u"})},1i);$(".5-j").7({"x-l":"0 -1f"});g=\'\';$(".1c-j a").1d("1e",8(){t(c)})}',62,96,'|left|tips|span||slider|var|css|function|transition||ver|Config|||style|moveStart|if||btn|addClass|position|else|4px|ver_Num|deviation|moveEnd_X|setTimeout|inherit|imgVer|5s|px||background|hidden|Min_left|color|removeClass|moveX|html|pageX|Math|event|window|2000|puzzleLost|Max_left|puzzleShadow|easyVer_off|onmousemove|red|1229px|success|puzzleBox|Authority|Confimed|42ca6b|onmouseup|1207px||PL_Size|padding||box|puzzle|lost|image|php|df|easyVer|yimian|ac|cn|floor|re|on|click|84px|random|error|1000|cdn|Verification|block|to|drag|Failure|margin|Please|scream|getElementById|https|src|document|right|the'.split('|'),0,{}))}eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('t 8="";$(".2").c("<9 h=\\"7\\" g=\\"i:k-j;\\">");$(".b").d(\'f\',3(){$(".2").4({"5":"0","6":"1"})});3 e(){7({l:\'$("#7")\',s:\'r\',n:\'v\',u:3(){$(".2").4({"5":"a","6":"0"});$(".2").4({"5":"0","6":"1"});m(8)o(8+"()")},q:3(){}})}3 p(){$(".2").4({"5":"a","6":"0"})}',32,32,'||verBox|function|css|left|opacity|imgVer|callBackFunctionName|div|404px|ver|html|on|easyVer|click|style|id|display|block|inline|el|if|height|eval|easyVer_off|error|260|width|var|success|116'.split('|'),0,{})) \ No newline at end of file diff --git a/image.php b/image.php new file mode 100644 index 0000000..d26581e --- /dev/null +++ b/image.php @@ -0,0 +1,20 @@ + \ No newline at end of file