中国菜刀的两个小插件(asp) 扫描常用端口+读取终端端口

admin 2021年4月3日18:50:57评论52 views字数 1179阅读3分55秒阅读模式

    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 …

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月3日18:50:57
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   中国菜刀的两个小插件(asp) 扫描常用端口+读取终端端口https://cn-sec.com/archives/318830.html

发表评论

匿名网友 填写信息