ARP防御批处理
@echo NO6u rdkP:ARP防御 by Amxking
if exist ipconfig.txt del ipconfig.txt5Ca Gp {wn E
ipconfig /all >c:\ipconfig.txt
if exist phyaddr.txt del phyaddr.txt3fGGg QjJ|
find "Physical Address" ipconfig.txt >phyaddr.txtXa+CP8W}I,P
for /f "skip=2 tokens=12" %%M in (phyaddr.txt) do set Mac=%%M
if exist IPAddr.txt del IPaddr.txt
find "IP Address" ipconfig.txt >c:\IPAddr.txt
for /f "skip=2 tokens=15" %%I in (IPAddr.txt) do set IP=%%I
arp -s %IP% %Mac%
if exist GateIP.txt del GateIP.txt-LnWis"wt
find "Default Gateway" ipconfig.txt >c:\GateIP.txt
for /f "skip=2 tokens=13" %%G in (GateIP.txt) do set GateIP=%%Gs2?9RuT
if exist GateMac.txt del GateMac.txt z0yD2sFT {O,@
arp -a %GateIP% >c:\GateMac.txt1Yke;_CG(n2E d]
for /f "skip=3 tokens=2" %%H in (GateMac.txt) do set GateMac=%%H
arp -s 192.168.0.250 00-1b-2a-3f-0a-89
exit
C-x4x'{.k!Myj
6~g(l$@]5{)af f4e lj
产生:
--------------------------ipconfig$x,j{ Gr/eYm
[b/M,X$E/XV1lU
X7]t;AF
Windows IP Configuration Q9y)L@8z6d,oX
_5jAg p+M]0~J3o,K
Host Name . . . . . . . . . . . . : 002
Primary Dns Suffix . . . . . . . :
L+daXb!z
Node Type . . . . . . . . . . . . : Unknown
sS$vC+_
IP Routing Enabled. . . . . . . . : No
n_` B/| L
WINS Proxy Enabled. . . . . . . . : No
T1U4v(m a vKNP
Ethernet adapter 本地连接 4:uCyST.G!\'r
(U x;oSg
Connection-specific DNS Suffix . :
,Ds'[u*~QwK
Description . . . . . . . . . . . : NVIDIA nForce Networking Controller8I"E3\.n1j%Js
Physical Address. . . . . . . . . : 00-50-8D-85-E1-724wjr0Fa ^Y3]%jH
Dhcp Enabled. . . . . . . . . . . : No
}%KcL8Me ux
IP Address. . . . . . . . . . . . : 192.168.0.2
qs/p8R+U{7_
Subnet Mask . . . . . . . . . . . : 255.255.255.0/nak!rfP(a)iz
(n'v3j3Vwge|
Default Gateway . . . . . . . . . : 192.168.0.250Zgw8|s
DNS Servers . . . . . . . . . . . : 192.168.0.250#\`-?Dt-H'y `;K
I}$lmD8a
----------------GateMac
Interface: 192.168.0.2 --- 0x2!U;| L(`:Y
Internet Address Physical Address Type2^X g8I$or
192.168.0.240 00-1d-0f-21-9c-f0 dynamic
192.168.0.250 00-1b-2a-3f-0a-89 dynamic
页:
[1]