用来猜后台的HTA小程序

所属分类: 脚本专栏 / hta 阅读数: 1828
收藏 0 赞 0 分享

复制代码 代码如下:

<input type=text id=http size=28 style="color:888888" value="http://www.haiyangtop.net">
<input type=button onclick=vbs:isExist(http.value) value="检测url是否存在" style="color:888888">
<div id="t"></div>

<script language=vbs>
function isExist(url)
dic="c:\dic.dic"
Set fso = CreateObject("Scripting.FileSystemObject")
set zidian=fso.OpenTextFile(dic,1,False)
Do While zidian.AtEndOfStream <> true
path=zidian.readline
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
       xmlhttp.open "GET",http.value+path,false
       xmlhttp.send
       t.innerHTML = t.innerHTML&url&path&"--------"&xmlhttp.status&"<br>"
       loop
End Function
</script>

JS版写法:

如果换js,要将第二行的“onclick=vbs:isExist(http.value)”里的"vbs:"去掉

复制代码 代码如下:

<script>
function isExist(url)
{
var myObject = new Object();
myObject.lcx1 = "/admin/index.asp";
myObject.lcx2 = "/safety";
myObject.lcx3 = "/safetyx";
for (lcx in myObject)
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlhttp.open("GET",http.value+myObject[lcx],false)
xmlhttp.send()
if(xmlhttp.status==200)
t.innerHTML += url+myObject[lcx]+"存在<br>";
else
t.innerHTML+= url+myObject[lcx]+"不存在<br>";
}
}
</script>

字典放在页面里的写法vbscript版:

复制代码 代码如下:

<script language=vbs>
function isExist(url)
Dim d  
       Set d = CreateObject("Scripting.Dictionary")
       d.Add "a","/admin/index.asp"
       d.Add "b", "/safety"
       d.Add "c", "/safetyx"
       a = d.Keys
       For i = 0 To d.Count -1 ' 遍历数组。
       set xmlhttp = CreateObject("Microsoft.XMLHTTP")
       xmlhttp.open "GET",http.value+d.Item(a(i)),false
       xmlhttp.send
       if xmlhttp.status=200 then
       t.innerHTML = t.innerHTML+url+d.Item(a(i))+"存在<br>"
       else
       t.innerHTML = t.innerHTML+url+d.Item(a(i))+"不存在<br>"
       end if
       Next
       end function
</script>

复制代码 代码如下:

<input type=text id=http size=28 style="color:888888" value="http://www.haiyangtop.net">
<input type=button onclick=isExist(http.value) value="打开字典进行猜解" style="color:888888">
<div id="t"></div>
<script language=vbs>

function isExist(url)
set objFile = CreateObject("SAFRCFileDlg.FileOpen")
intRet = objFile.OpenFileOpenDlg
if intret then
dic= objFile.filename
end if
if dic<>"" then
Set fso = CreateObject("Scripting.FileSystemObject")
set zidian=fso.OpenTextFile(dic,1,False)
If 2 = MsgBox( "字典为:" & objFile.filename & vbCrLf & " 您确定吗?", 32 + 1, "请确认" ) Then isExist(http.value)

Do While zidian.AtEndOfStream <> true
path=zidian.readline
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
     xmlhttp.open "GET",http.value+path,false
     xmlhttp.send
     t.innerHTML = t.innerHTML&url&path&"--------"&"<font color=red>"&xmlhttp.status&"</font><br>"
     loop
end if
End function
</script>

最后一个比较好用

更多精彩内容其他人还在看

hta查看磁盘空间的脚本

用hta实现的可以查看磁盘剩余空间的脚本
收藏 0 赞 0 分享

HTA编辑HOST文件的脚本

一个修改HOST文件的小工具,利用FSO实现,代码比较长,功能也比较多
收藏 0 赞 0 分享

hta实现的定时重启或关闭计算机的小工具

一个用于定时重启或关闭计算机的小工具,适用于Windows 2K/XP/2003
收藏 0 赞 0 分享

hta实现的二进制文件转换为文本

hta 二进制文件转换为文本工具
收藏 0 赞 0 分享

风讯注入exp(hta版)代码发布

风讯注入exp实例代码,hta版的方便使用
收藏 0 赞 0 分享

学习正则帮手笨狼正则练习器

把下面的文件保存为hta文件,运行即可
收藏 0 赞 0 分享

hta实现的笨狼XSLT练习器

学习XSLT的朋友,用这个小工具不错
收藏 0 赞 0 分享

hta实现的笨狼树状节点查看器

笨狼树状节点查看器
收藏 0 赞 0 分享

hta作品笨狼CSDN爬虫

笨狼CSDN爬虫
收藏 0 赞 0 分享

hta(vbs)列目录树代码

一个网友在短消息里问我这个问题,并给出了他写的出错代码。短消息有字数限制,在此回复他一下。玩了两个月,没有写代码了,脑子不好用了。费了好大劲,最后还是请教了老马才把网友的代码更写出来,几乎是重写了,呵呵。
收藏 0 赞 0 分享
查看更多