rem switch.bat
@echo off
@ping -n 1 192.168.0.1
|@find "Reply"
if %ERRORLEVEL%==1 goto cnc else goto tel
rem 打开网上邻居,查看网卡名是否是“本地连接”,不是的话,修改。
:cnc
interface ip set address name="本地连接" source=static addr=192.168.2.222 mask=255.255.255.0 gateway=192.168.2.245 gwmetric=1
:tel
interface ip set address name="本地连接" source=static addr=192.168.0.222 mask=255.255.255.0 gateway=192.168.0.1 gwmetric=1
我就想让这个脚本随时ping 192.168.0.1 这是电信的网关 如果断了 就切换到网通cnc的网关,然后希望能够隐藏执行