我正在寻找一种方法来扫描我们网络上的所有计算机并返回其计算机名称和分配的 IP。
例如:
scanrange -s 10.222.0.0 -e 10.222.255.255
我正在寻找的结果是这样的
10.222.4.2 - \\EDC-SR-USR-004456
10.222.4.3 - \\EDC-SR-USR-004466
10.222.4.4 - \\EDC-SR-USR-004826
...
有没有关于如何通过命令提示符完成此操作的例子?
答案1
Angry IP 扫描仪支持命令行,但它无法在提示符中显示结果。但它可以写入文件,稍后您可以在命令提示符中显示该文件。
例如:
C:\Users\<NAME>\Downloads>ipscan-3.0-beta4.exe -f:range 10.0.0.10 10.0.0.20 -s -q
启动扫描,扫描范围为 192.168.1.10 - 192.168.1.20
C:\Users\<NAME>\Downloads>ipscan-3.0-beta4.exe -f:range 10.0.0.10 10.0.0.20 -s -q -o log.txt
启动扫描,扫描范围为 192.168.1.10 - 192.168.1.20,并将结果写入 log.txt
type log.txt
然后将日志文件打印到命令提示符,如下所示:
Generated by Angry IP Scanner 3.0-beta4
http://www.azib.net/ipscan/
Scanned 10.0.0.130 - 10.0.0.140
8-jul-2010 10:53:38
IP Ping Hostname Ports
10.0.0.130 [n/a] [n/s] [n/s]
10.0.0.131 [n/a] [n/s] [n/s]
10.0.0.132 [n/a] [n/s] [n/s]
10.0.0.133 [n/a] [n/s] [n/s]
10.0.0.134 [n/a] [n/s] [n/s]
10.0.0.135 [n/a] [n/s] [n/s]
10.0.0.136 [n/a] [n/s] [n/s]
10.0.0.137 [n/a] [n/s] [n/s]
10.0.0.138 1 ms HOSTNAM [n/s]
10.0.0.139 [n/a] [n/s] [n/s]
10.0.0.140 [n/a] [n/s] [n/s]
这些是 Angry IP 扫描仪的命令:
Pass the following arguments:
[options] <feeder> <exporter>
Where <feeder> is one of:
-f:range <Start IP> <End IP>
-f:random <Base IP> <IP Mask> <Count>
-f:file <File>
<exporter> is one of:
-o filename.txt Text file (txt)
-o filename.csv Comma-separated file (csv)
-o filename.xml XML file (xml)
-o filename.lst IP:Port list (lst)
And possible [options] are (grouping allowed):
-s start scanning automatically
-q quit after exporting the results
-a append to the file, do not overwrite
答案2
nmap-http://nmap.org/- 是一款出色的端口扫描器,可以进行名称查找。
如果你只是想从 Windows 中获取机器名称列表(我猜,鉴于你参考了“命令提示符”),你可以简单地使用net view