把防ARP攻击加进去
:读取本机Mac地址
if exist c:\\ipconfig.txt del c:\\ipconfig.txt
ipconfig /all >c:\\ipconfig.txt
if exist c:\\phyaddr.txt del c:\\phyaddr.txt
find "Physical Address" c:\\ipconfig.txt >c:\\phyaddr.txt
for /f "skip=2 tokens=12" %%M in (c:\\phyaddr.txt) do set Mac=%%M
:读取本机ip地址
if exist c:\\IPAddr.txt del c:\\IPaddr.txt
find "IP Address" c:\\ipconfig.txt >c:\\IPAddr.txt
for /f "skip=2 tokens=15" %%I in (c:\\IPAddr.txt) do set IP=%%I
:绑定本机IP地址和MAC地址
arp -s %IP% %Mac%
:读取网关地址
if exist c:\\GateIP.txt del c:\\GateIP.txt
find "Default Gateway" c:\\ipconfig.txt >c:\\GateIP.txt
for /f "skip=2 tokens=13" %%G in (c:\\GateIP.txt) do set GateIP=%%G
:读取网关Mac地址
if exist c:\\GateMac.txt del c:\\GateMac.txt
arp -a %GateIP% >c:\\GateMac.txt
for /f "skip=3 tokens=2" %%H in (c:\\GateMac.txt) do set GateMac=%%H
:绑定网关Mac和IP
arp -s %GateIP% %GateMac%
arp -s 125.90.79.187 00-E0-4D-0F-67-11
arp -s 125.90.79.188 00-E0-4D-0F-0A-3B
arp -s 125.90.79.189 00-E0-4D-0F-0A-4B
arp -s 125.90.79.190 00-E0-4D-0D-F8-BE