王海相声,办理建筑资质,复婚手续
on error resume next
if (lcase(right(wscript.fullname,11))="wscript.exe") then
wscript.echo "execute it under the cmd.exe plz! thx."
wscript.quit
end if
if wscript.arguments.count=0 then
usage()
wscript.quit
end if
set arg=wscript.arguments
sport= split(arg(1),",")
for i=0 to ubound(split(arg(1),","))
wsh.echo "scan "&sport(i)&" ing……"
set x=createobject("msxml2.serverxmlhttp")
x.open "post","http://"&arg(0)&":"&sport(i)
x.send("hello")
wsh.echo space(3)&"error.number:"& err.number & space(5)&"err.description:"&err.description
if err.number=0 or err.number=-2147012866 or err.number=-2147012894 or err.number=-2147012744 or err.number=-2147467259 then
wsh.echo space(3)&" the "&sport(i)&" port is open"
end if
next
function usage()
wscript.echo "| 注意查看err.description来判断端口开放,自动探测不一定准确 |"
wscript.echo "| |"
wscript.echo "|useage: |"
wscript.echo "| cscript.exe this.vbs ip port |"
wscript.echo "|ex: |"
wscript.echo "| cscript.exe this.vbs ip 80 or 80,123,445…… |"
wscript.echo "+-------------------------------------------------------------------+"&chr(10)
end function
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!!
点击进行留言回复
相关文章:
-
-
-
-
用vbs实现文本循环读取
因为测试中需要读取一批url数据进行浏览,其实使用qtp本身的table能实现多种读取方式,但是因为需要tabel是使用excel保存的,在没有...
[阅读全文]
-
-
-
-
-
-
-
网友评论