我现在是想这样的,网吧最近常中一些网关欺骗性的病毒,我想如果用批处理得到本机的IP和MAC地址。。基本思路是这样,但有不解的请高手帮忙。。
首先用
IPCONFIG /ALL >A.TXT
得到 A.TXT 如下
Windows IP Configuration
Host Name . . . . . . . . . . . . : USER019
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
Physical Address. . . . . . . . . : 00-50-8D-62-48-FF
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.200
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 202.101.107.55
202.101.98.55
现在想问的是如何将
IP Address. . . . . . . . . . . . : 192.168.0.200
后面的 192.168.0.200 设为变量1%,将
Physical Address. . . . . . . . . : 00-50-8D-62-48-FF
后面的 00-50-8D-62-48-FF 设为变量2%
最后通过 arp -s 1% 2%
完成批处理。。
首先用
IPCONFIG /ALL >A.TXT
得到 A.TXT 如下
Windows IP Configuration
Host Name . . . . . . . . . . . . : USER019
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
Physical Address. . . . . . . . . : 00-50-8D-62-48-FF
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.200
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 202.101.107.55
202.101.98.55
现在想问的是如何将
IP Address. . . . . . . . . . . . : 192.168.0.200
后面的 192.168.0.200 设为变量1%,将
Physical Address. . . . . . . . . : 00-50-8D-62-48-FF
后面的 00-50-8D-62-48-FF 设为变量2%
最后通过 arp -s 1% 2%
完成批处理。。
