首頁  >  文章  >  微信小程式  >  實現猜後台的HTA小程式的多種方法

實現猜後台的HTA小程式的多種方法

高洛峰
高洛峰原創
2017-03-24 13:24:092056瀏覽

這篇文章分享實作猜後台的HTA小程式的多種方法

<input type=text id=http size=28 style="color:888888" value="[url]http://www.haiyangtop.net[/url]">
<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 &#39; 遍历数组。
       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="[url]http://www.haiyangtop.net[/url]">
<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小程式的多種方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn