国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTA > 正文

用來猜后臺的HTA小程序

2020-01-31 15:41:40
字體:
供稿:網(wǎng)友

復(fù)制代碼 代碼如下:

<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:"去掉

復(fù)制代碼 代碼如下:

<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版:

復(fù)制代碼 代碼如下:

<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 ' 遍歷數(shù)組。
       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>

復(fù)制代碼 代碼如下:

<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>

最后一個比較好用

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 溧水县| 凯里市| 德令哈市| 余江县| 集安市| 启东市| 和平区| 大同县| 和政县| 五寨县| 崇明县| 万盛区| 将乐县| 罗甸县| 张家港市| 营山县| 开封县| 渝北区| 白山市| 永定县| 关岭| 宁津县| 建昌县| 中牟县| 峨山| 彭山县| 和田县| 麻江县| 贺州市| 安溪县| 横山县| 乐清市| 迁西县| 石棉县| 淅川县| 陵川县| 咸阳市| 长泰县| 绩溪县| 呼和浩特市| 杂多县|