用来猜后台的hta小程序
来源:易贤网 阅读:734 次 日期:2016-06-30 09:15:53
温馨提示:易贤网小编为您整理了“用来猜后台的hta小程序”,方便广大网友查阅!

代码如下:

<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小程序
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 云南省教育厅备案号:云教ICP备0901021 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标