回复 1# kav0123
你IP地址段是不是打错了?
应该是 192.168.0.25-192.168.0.78 , 192.168.3.52-192.168.3.90 , 92.168.5.20-192.168.5.55 吧- @echo off
- for /f "tokens=4" %%a in ('route print^|findstr 0.0.0.0.*0.0.0.0') do set ip=%%a
- for /F "tokens=3,4 delims=." %%i in ("%ip%") do (
- if %%i EQU 0 if %%j GEQ 25 if %%j LEQ 78 set "self=true"
- if %%i EQU 3 if %%j GEQ 52 if %%j LEQ 90 set "self=true"
- if %%i EQU 5 if %%j GEQ 20 if %%j LEQ 55 set "self=true"
- )
- if not "%self%"=="true" exit /B
复制代码
|