tools‎ > ‎my tools‎ > ‎

simple port scan tool

【ダウンロード】
http://www.ixam.net/Downloads/portscan_ver0.01.zip

【simple port scan tool】

【制作日】2009/11/21

【動作環境】Windows XP, Windows Scripting Host, hta, netsh command

【開発環境】notepad

■機能■
任意のホストに対して、開始portナンバーと終了portナンバーを指定して、
サービスが生きているかどうかの確認結果を出力します。
いわゆるポートスキャンの役割を果たしますが、中身を見れば解る通り、netshを打ってるだけなので、遅いです。
ウェルノウンポート(Well Known Ports)の指定や柔軟なポート指定は未対応なので、今の所実用性も低いはずです。
試験環境などでの使用を想定します。

■ファイル構成■
portscan_ver0.01.hta→本体

■インストール方法■
1.portscan_ver0.01.htaを適当なフォルダに展開。

■アンインストール方法■
展開したフォルダを削除。

■使い方■
portscan_ver0.01.htaをダブルクリックで起動。

■注意■
自分が管理しているサーバ以外に使用すると他の人に攻撃行為とみなされ、ものすごく怒られる可能性があります。
入力チェック等の高等な機能は一切搭載してませんので、わかった上で使ってください。
よくわかんない人は使わない事。
全て自己責任において使用のこと。

■実行イメージ■

以上。

■参考にportscan_ver0.01.htaべた張り

<html><head>
<title>simple_port_scanner</title></head>
<body>
<form name="port_scan_form">
    <h1>simple port scanner</h1>

    <h2>target server</h2>
    <p>IP address or hostname :
    <input type="text" name="ipaddr" value="127.0.0.1" /></p>

    <h2>target port</h2>
    <p>range :<input type="text" name="start_port" value="80" /> to <input type="text" name="end_port" value="80" /></p>

    <p><input type="button" value="start_scan" onClick="go_scan()" /></p>

    <h2>result</h2>
    <p><textarea name="portscan_output" cols="80" rows="30"></textarea><input type="reset" value="clear"></p>
</form>
<center><p>(c) 2009 <a href="http://qx-xp.net">qx-xp</a> All rights reserved</p></center>
<script language="VBScript">
    Dim WshShell, oExec
    Set WshShell = CreateObject("WScript.Shell")

    Sub go_scan()
        document.port_scan_form.portscan_output.value = ""

        For i = document.port_scan_form.start_port.value To document.port_scan_form.end_port.value
            exCommand = "netsh diag connect iphost " & document.port_scan_form.ipaddr.value & " " & i
            Set oExec = WshShell.Exec(exCommand)
            R = oExec.Stdout.ReadAll
            document.port_scan_form.portscan_output.value = document.port_scan_form.portscan_output.value & R
        Next
    End Sub

</script>
</body></html>