By:nowake
中国菜刀的两个小插件(asp),扫描常用端口,读取终端端口(3389、Mstsc)。
![]()
扫描常用端口:
ip="127.0.0.1"
port="21,23,80,3306,1433,3389,43958"
arrport=Split(port,",")
For i=0 To Ubound(arrport)
If Isnumeric(arrport(i)) Then
Call Scan(ip, arrport(i))
end if
next
Sub Scan(scanip,theport)
on error resume next
set conn=server.createobject("Adodb.connection")
connstr="Provider=SQLOLEDB.1;Data Source=" & scanip & "," & theport & ";User ID=yezi;Password=;"
conn.ConnectionTimeout=1
conn.open connstr
If Err Then
If Err.number=-2147217843 or Err.number=-2147467259 Then
If InStr(Err.description, "(Connect()).") > 0 Then
response.write scanip & ":" & theport & ":close" & chr(13) & chr(10)
Else
response.write scanip & ":" & theport & ":open." & chr(13) & chr(10)
End If
End If
End If
end sub
|
![]()
读取终端端口:
set ws=createobject("wscript.shell")
port=ws.regread("HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpPortNumber")
response.write "Terminal port is "& port
|
文章来源于lcx.cc:中国菜刀的两个小插件(asp) 扫描常用端口+读取终端端口
相关推荐: 【Exp】phpcms v2.4 SQL injection exploit (test vbs_exp)
以下是引用片段: on error resume next Set objArgs = WScript.Arguments dim my_http dim my_path dim fjhgx print_r() if objArgs.length …
评论