Anti-ARP spoofing batch processing (binding ARP)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.