ARP defense Batch Processing

Source: Internet
Author: User

@ Echo NO
: ARP defense by Amxking
If exist ipconfig.txt del ipconfig.txt
Ipconfig/all> c: ipconfig.txt
If exist phyaddr.txt del phyaddr.txt
Find "Physical Address" ipconfig.txt> phyaddr.txt
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 already ip.txt del already ip.txt
Find "Default Gateway" ipconfig.txt> c: GateIP.txt
For/f "skip = 2 tokens = 13" % G in (ip.txt) do set destination IP = % G
If exist GateMac.txt del GateMac.txt
Arp-a % slave IP %> c: GateMac.txt
For/f "skip = 3 tokens = 2" % H in (GateMac.txt) do set hosts MAC = % H
Arp-s 192.168.0.250 00-1b-2a-3f-0a-89
Exit

 

 


Generation:

-------------------------- Ipconfig


Windows IP Configuration


Host Name ......: 002

Primary Dns Suffix .......:

Node Type ......: Unknown

IP Routing Enabled...: No

WINS Proxy Enabled...: No


Ethernet adapter local connection 4:


Connection-specific DNS Suffix .:

Description ......: NVIDIA nForce Networking Controller

Physical Address ......: 00-50-8D-85-E1-72

Dhcp Enabled...

IP Address ......: 192.168.0.2

Subnet Mask ......: 255.255.255.0

Default Gateway ......: 192.168.0.250

DNS Servers ......: 192.168.0.250

---------------- Running Mac

Interface: 192.168.0.2 --- 0x2
Internet Address Physical Address Type
192.168.0.240 00-1d-0f-21-9c-f0 dynamic
192.168.0.250 00-1b-2a-3f-0a-89 dynamic

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.