内网无工具扫描
一条 cmd 命令解决:
for /l %i in (1,1,255) do @ping 192.168.1.%i -w 1 -n 1 | find /i "ttl"
ping 整个 c 段,只输出有响应的主机。
% H" g% Q+ _6 q- P7 t
更变态的:
4 o4 g8 X- v9 x& w
域机器对应 IP
for /F "eol=- tokens=1 delims=\ " %a IN ('net view') DO @(echo name: %a, ip: & ping %a -w 1 -n 1 | find /i "ttl" & echo.)
把 net view 的结果,挨个 ping 一遍,并输出机器名和 ip 地址。
找主机名
for /l %i in (1,1,255) do @ping -a 10.0.1.%i -w 1 -n 1 | find /i "Pinging"
B 段查找
for /l %i in (1,1,255) do @ping -a 10.0.%i.1 -w 1 -n 1 | find /i "Pinging"
Win7
for /l %i in (1,1,255) do @ping -a 10.0.1.%i -w 1 -n 1 | find /i "Pinging"
for /l %i in (1,1,255) do @ping -a 10.0.%i.1 -w 1 -n 1 | find /i "Pinging"
改成
for /l %i in (1,1,255) do @ping -a 10.0.1.%i -w 1 -n 1 | find /i "Ping"
for /l %i in (1,1,255) do @ping -a 10.0.%i.1 -w 1 -n 1 | find /i "Ping"
就可以兼容 Win7 了。(Win7 ping -a 输出结果关键词为 “Ping”)
另外findstr /i “pinging” 或 findstr /i “ping” 可以换成 findstr “[” 的 可以适合多语言环境
查找文件命令:
for /r 目录名:\ %i in (匹配模式) do @echo %i
例如:for /r c:\ %i in (Newslist*.aspx) do @echo %i
或者
for /r c:\ %i in (Newslist.aspx*) do @echo %i
参考链接:
http://docs.ioin.in/writeup/www.mottoin.com/_92978_html/index.html