2009-06-12 16:31
Bat_mac_ip
@echo off
for /f "tokens=12" %%m in ('ipconfig /all ^| find /i "physical address"') do set pm=%%m
echo 网卡地址: %pm%
for /f "tokens=15" %%i in ('ipconfig ^| find /i "ip address"') do set ip=%%i
echo IP地址: %ip%
if "%ip:~-4,-3%" == "." set ipa=%ip:~,-3% || if "%ip:~-3,-2%" == "." set ipa=%ip:~,-2% || if "%ip:~-2,-1%" == "." set ipa=%ip:~,-1%
::echo %ipa%
set /p in=请输入需要扫描询的ip起始地址(1-255):
set inip=%ipa%%in%
:: 去掉空格
set inip=%inip: =%
echo 您选择的ip范围: %inip% - 255
set date0=%date:~0,10%
nbtscan %inip%-255
nbtscan %inip%-255 >%date0:-=%_mac.txt
pause>nul
:: nbtscan 133.5.17.1
:: set time0=%time:~0,8%
:: " :-= " 不显示-; " ::= "不显示 :
:: ipconfig > ipconfig.txt
:: find "IP Address" ipconfig.txt > ip.txt
:: for /f "skip=2 tokens=15" %%a in (ip.txt) do set strIP=%%a
:: del ipconfig.txt & del ip.txt
:: 显示IP地址字符串
:: echo IP地址: %strIP%
-----------------------------------------
:: set time0=%time:~0,8%
:: " :-= " 不显示-
" ::= "不显示 :
set inip=%inip: =% 去掉空格
for /f "tokens=12" %%m in ('ipconfig /all ^| find /i "physical address"') do set pm=%%m
echo 网卡地址: %pm%
for /f "tokens=15" %%i in ('ipconfig ^| find /i "ip address"') do set ip=%%i
echo IP地址: %ip%
if "%ip:~-4,-3%" == "." set ipa=%ip:~,-3% || if "%ip:~-3,-2%" == "." set ipa=%ip:~,-2% || if "%ip:~-2,-1%" == "." set ipa=%ip:~,-1%
::echo %ipa%
set /p in=请输入需要扫描询的ip起始地址(1-255):
set inip=%ipa%%in%
:: 去掉空格
set inip=%inip: =%
echo 您选择的ip范围: %inip% - 255
set date0=%date:~0,10%
nbtscan %inip%-255
nbtscan %inip%-255 >%date0:-=%_mac.txt
pause>nul
:: nbtscan 133.5.17.1
:: set time0=%time:~0,8%
:: " :-= " 不显示-; " ::= "不显示 :
:: ipconfig > ipconfig.txt
:: find "IP Address" ipconfig.txt > ip.txt
:: for /f "skip=2 tokens=15" %%a in (ip.txt) do set strIP=%%a
:: del ipconfig.txt & del ip.txt
:: 显示IP地址字符串
:: echo IP地址: %strIP%
-----------------------------------------
:: set time0=%time:~0,8%
:: " :-= " 不显示-
" ::= "不显示 :
set inip=%inip: =% 去掉空格
没有评论:
发表评论