被ARPæ¶æå·¥å
·ï¼è¿å±äºç½å
³æ¬ºéªæ»å»ãå¼å§---å¨è¿è¡éè¾å
¥ cmd
å¨CMD éé¢è¾å
¥ arp -s ç½å
³IP ç½å
³MAC
大åå车
ä½ å arp -a
å车就è½çå°ï¼Type ç± dynamicåæ static
è¿æ · ä½ å»ç½å
³çæ°æ®å°±å°±ä¼å°è£
ä¸ è¿ä¸ªéæçMACå°åã
èä¸ä¼å被ARPç
æ¯æ¶æä¿®æ¹ã
ä¸é¢è¿ææ¹å¤çã
å¤å¶å°ææ¬æ件ä¿ååæåç¼.txt æ¹æ .bat åå»å°±èªå¨ç»å®äºã
@echo off
if exist ipconfig.txt del ipconfig.txt
ipconfig /all >ipconfig.txt
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
ping %GateIP% -n 1
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
arp -s %GateIP% %GateMac%
del GateIP.txt
del GateMac.txt
del ipconfig.txt
exit
温馨提示:答案为网友推荐,仅供参考