CopyCodeThe Code is as follows: @ echo off
ARP-d
If % ~ N0 = ARP exit
If % ~ N0 = ARP exit
If % ~ N0 = ARP exit
ECHO is obtaining local information .....
: IP
For/F "Skip = 13 tokens = 15 usebackq" % I in ('ipconfig/all') do set IP = % I & goto Mac
: Mac
Echo IP: % IP %
For/F "Skip = 13 tokens = 12 usebackq" % I in ('ipconfig/all') do set MAC = % I & goto custom IP
: Elastic IP
Echo Mac: % Mac %
ARP-S % IP % Mac %
ECHO is obtaining gateway information .....
For/F "Skip = 17 tokens = 13 usebackq" % I in ('ipconfig/all') do set multicast IP = % I & goto encrypt Mac
: Running Mac
Echo response IP: % response IP %
Ping % Taobao IP %-T-N 1
For/F "Skip = 3 tokens = 2 usebackq" % I in ('Arp-A % Taobao IP % ') do set hosts MAC = % I & goto start
: Start
Echo encrypted Mac: % encrypted Mac %
ARP-S % gateip % gatemac %
Echo operation completed !!!
Exit