arp病毒 防止arp病毒的批处理
代码如下:
@echo off :::::::::::::::::::::::::::::::::::::::::::::::::::: : 本机以及网关IP和MAC地址绑定批处理程序:: :::::::::::::::::::::::::::::::::::::::::::::::::::: arp -d :::::::::读取本机Mac地址 if exist ipconfig.txt del ipconfig.txt ipconfig /all >ipconfig.txt if exist phyaddr.txt del phyaddr.txt find "Physical Address" ipconfig.txt >phyaddr.txt for /f "skip=2 tokens=12" %%M in (phyaddr.txt) do set Mac=%%M :::::::::读取本机ip地址 if exist IPAddr.txt del IPaddr.txt find "IP Address" ipconfig.txt >IPAddr.txt for /f "skip=2 tokens=15" %%I in (IPAddr.txt) do set IP=%%I :::::::::绑定本机IP地址和MAC地址 arp -s %IP% %Mac% :::::::::读取网关地址 if exist GateIP.txt del GateIP.txt find "Default Gateway" ipconfig.txt >GateIP.txt for /f "skip=2 tokens=13" %%G in (GateIP.txt) do set GateIP=%%G :::::::::获取网关MAC地址 ping 192.168.0.1 -n 1 :::::::::读取网关Mac地址 if exist GateMac.txt del GateMac.txt arp -a %GateIP% >GateMac.txt for /f "skip=3 tokens=2" %%H in (GateMac.txt) do set GateMac=%%H :::::::::绑定网关Mac和IP arp -s %GateIP% %GateMac% del GateIP.txt del GateMac.txt del IPAddr.txt del ipconfig.txt del phyaddr.txt exit复制以上代码保存为bat文件.加载到启动项去,这样应该能防护到!
相关推荐
Micusd 2020-11-19
cheidou 2020-11-19
星马殇 2020-11-18
Echodat 2020-10-08
flyToSkyL 2020-09-11
zjc 2020-09-03
阳光普照 2020-09-01
十年砍柴 2020-08-30
猪猪侠喜欢躲猫猫 2020-08-17
ladewang 2020-08-17
渣渣灰 2020-08-13
blankt 2020-08-15
vickay 2020-08-09
TinyDolphin 2020-08-09
山兔与孟婆 2020-08-09
longjing 2020-08-07
xiaogoua 2020-08-06