Win7无线热点查看程序:
http://pan.baidu.com/share/link?shareid=124942&uk=135080376
@echo off & setlocal EnableDelayedExpansion
color 1F & title Win7无线热点客户端查看程序 rem 无线热点客户端查看程序
rem 版本 0.2 Beta (
set "ismode=" &rem 无线热点模式是否启用
set "isstart=" &rem 无线热点状态是否开启
set "isap=" &rem 是否找到ap信息
set "apssid=" &rem 无线热点的ssid
set "apmac=" &rem 无线热点的物理地址
set "apip=" &rem 无线热点的IP地址
set "sumclient=" &rem 连接到无线热点的客户端总数
set "clientip=" &rem 客户端ip
set "clientmac=" &rem 客户端mac
set "clientstate=" &rem 客户端验证状态
set "ipclass=" &rem 客户端ip类型
set "n=" &rem 临时变量
) :Begin
echo 无线热点信息:
rem 获取无线热点模式信息
for /f "skip=3 tokens=2 usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do (
if "!ismode!"=="" (
if "%%i"==" 已启用" (set "ismode=true") else (set "ismode=false")
if "%%i"=="" (echo 无线热点模式:不可用) else echo 无线热点模式:%%i
)
)
rem 获取无线热点状态信息
for /f "skip=11 tokens=2 usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do (
if "!isstart!"=="" (
if "%%i"==" 已启动" (set "isstart=true") else (set "isstart=false")
if "%%i"=="" (echo 无线热点状态:不可用) else echo 无线热点状态:%%i
)
)
rem 获取无线热点的SSID、MAC、IP
if /i "!isstart!"=="true" (
for /f "skip=4 tokens=1* usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do if "!apssid!"=="" set "apssid=%%j"
echo 无线热点的SSID:!apssid!
for /f "skip=12 tokens=1* usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do if "!apmac!"=="" set "apmac=%%j"
set "apmac=!apmac::=-!" &rem 将:转换为-
echo 无线热点的物理地址:!apmac!
for /f "tokens=1* usebackq delims=:" %%i in (`ipconfig /all`) do (
if /i "%%j"==" !apmac!" set "isap=true" &rem 已进入ap信息
if /i "!isap!"=="true" (
set "n=%%i"
if /i "!n:~0,7!"==" IPv4" (
set "apip=%%j"
set "isap=false" &rem 已离开ap信息
)
)
)
for /f "delims=(" %%i in ("!apip!") do set "apip=%%i" &rem 分离出ip地址
echo 无线热点的IP地址:!apip!
) else echo 未启动无线热点,SSID不可用 & echo 未启动无线热点,IP和物理地址不可用
echo - - - - - -
echo; if /i not "!isstart!"=="true" (echo 未启动无线热点,客户端信息不可用) else (
echo 连接到无线热点上的客户端信息:
rem 获取客户端总数
for /f "skip=15 tokens=2 usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do (
if "!sumclient!"=="" (
set "sumclient=%%i"
echo 连接到无线热点的客户端总数:!sumclient!
)
)
if !sumclient! gtr 0 (
echo 编号 类型 验证状态 物理地址 IP地址
set "n=1"
for /f "skip=16 tokens=1,2 usebackq delims= " %%i in (`netsh wlan show hostednetwork`) do (
set "clientmac=%%i"
set "clientmac=!clientmac::=-!" &rem 将:转换为-
set "clientstate=%%j"
for /f "tokens=1,3 usebackq deli*** in (`arp -a -n %apip% ^| find /i "!clientmac!"`) do (
set "clientip=%%l"
set "ipclass=%%m"
)
echo !n! !ipclass! !clientstate! !clientmac! !clientip!
set /a n+=1
)
) else echo 当前没有客户端连接到无线热点上
)
echo - - - - - - :End
pause
http://pan.baidu.com/share/link?shareid=124942&uk=135080376
@echo off & setlocal EnableDelayedExpansion
color 1F & title Win7无线热点客户端查看程序 rem 无线热点客户端查看程序
rem 版本 0.2 Beta (
set "ismode=" &rem 无线热点模式是否启用
set "isstart=" &rem 无线热点状态是否开启
set "isap=" &rem 是否找到ap信息
set "apssid=" &rem 无线热点的ssid
set "apmac=" &rem 无线热点的物理地址
set "apip=" &rem 无线热点的IP地址
set "sumclient=" &rem 连接到无线热点的客户端总数
set "clientip=" &rem 客户端ip
set "clientmac=" &rem 客户端mac
set "clientstate=" &rem 客户端验证状态
set "ipclass=" &rem 客户端ip类型
set "n=" &rem 临时变量
) :Begin
echo 无线热点信息:
rem 获取无线热点模式信息
for /f "skip=3 tokens=2 usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do (
if "!ismode!"=="" (
if "%%i"==" 已启用" (set "ismode=true") else (set "ismode=false")
if "%%i"=="" (echo 无线热点模式:不可用) else echo 无线热点模式:%%i
)
)
rem 获取无线热点状态信息
for /f "skip=11 tokens=2 usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do (
if "!isstart!"=="" (
if "%%i"==" 已启动" (set "isstart=true") else (set "isstart=false")
if "%%i"=="" (echo 无线热点状态:不可用) else echo 无线热点状态:%%i
)
)
rem 获取无线热点的SSID、MAC、IP
if /i "!isstart!"=="true" (
for /f "skip=4 tokens=1* usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do if "!apssid!"=="" set "apssid=%%j"
echo 无线热点的SSID:!apssid!
for /f "skip=12 tokens=1* usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do if "!apmac!"=="" set "apmac=%%j"
set "apmac=!apmac::=-!" &rem 将:转换为-
echo 无线热点的物理地址:!apmac!
for /f "tokens=1* usebackq delims=:" %%i in (`ipconfig /all`) do (
if /i "%%j"==" !apmac!" set "isap=true" &rem 已进入ap信息
if /i "!isap!"=="true" (
set "n=%%i"
if /i "!n:~0,7!"==" IPv4" (
set "apip=%%j"
set "isap=false" &rem 已离开ap信息
)
)
)
for /f "delims=(" %%i in ("!apip!") do set "apip=%%i" &rem 分离出ip地址
echo 无线热点的IP地址:!apip!
) else echo 未启动无线热点,SSID不可用 & echo 未启动无线热点,IP和物理地址不可用
echo - - - - - -
echo; if /i not "!isstart!"=="true" (echo 未启动无线热点,客户端信息不可用) else (
echo 连接到无线热点上的客户端信息:
rem 获取客户端总数
for /f "skip=15 tokens=2 usebackq delims=:" %%i in (`netsh wlan show hostednetwork`) do (
if "!sumclient!"=="" (
set "sumclient=%%i"
echo 连接到无线热点的客户端总数:!sumclient!
)
)
if !sumclient! gtr 0 (
echo 编号 类型 验证状态 物理地址 IP地址
set "n=1"
for /f "skip=16 tokens=1,2 usebackq delims= " %%i in (`netsh wlan show hostednetwork`) do (
set "clientmac=%%i"
set "clientmac=!clientmac::=-!" &rem 将:转换为-
set "clientstate=%%j"
for /f "tokens=1,3 usebackq deli*** in (`arp -a -n %apip% ^| find /i "!clientmac!"`) do (
set "clientip=%%l"
set "ipclass=%%m"
)
echo !n! !ipclass! !clientstate! !clientmac! !clientip!
set /a n+=1
)
) else echo 当前没有客户端连接到无线热点上
)
echo - - - - - - :End
pause