Various methods to implement HTA applet for guessing the background

高洛峰
Release: 2017-03-24 13:24:09
Original
2005 people have browsed it

This article shares various methods to implement the HTA applet for guessing the background

<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>
Copy after login

==================JS version writing method:

If you change js, you need to remove "vbs:" in "onclick=vbs:isExist(http.value)" in the second line

<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>
Copy after login

How to write the dictionary in the page vbscript version:

<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>
Copy after login

============================================== ===

<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>
Copy after login

==========The last one is easier to use

The above is the detailed content of Various methods to implement HTA applet for guessing the background. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!