China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 16:31
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Original] Fully Automatic Tool for Setting Machine Numbers and IP (Absolutely Practical) View 24,720 Replies 148
Floor 61 Posted 2007-04-19 02:09 ·  中国 湖南 长沙 电信
新手上路
Credits 2
Posts 1
Joined 2007-02-12 09:29
19-year member
UID 79296
Gender Male
Status Offline
Top. . . . . . . . . . . . . .
Floor 62 Posted 2007-04-19 05:44 ·  中国 湖北 武汉 联通
中级用户
★★
Credits 245
Posts 103
Joined 2006-06-30 00:00
19-year member
UID 57801
Gender Male
Status Offline
When this code is executed on WINDOWS 2000, especially when using the NETSH command, an error message "Interface not found: Local Area Connection" will appear. Moreover, when other batch scripts call the NETSH command to modify the gateway, IP, DNS, and MASK, the prompt of "Interface not found: Local Area Connection" will also appear. May I ask the great one, what is the reason?
Floor 63 Posted 2007-04-19 07:00 ·  中国 湖南 衡阳 电信
新手上路
Credits 16
Posts 8
Joined 2007-04-19 06:22
19-year member
UID 85701
Gender Male
Status Offline
Just make a mark first, let's try first, come back if there's a problem
Floor 64 Posted 2007-04-20 12:04 ·  中国 广东 湛江 廉江市 电信
高级用户
★★★
Credits 959
Posts 311
Joined 2006-04-11 14:08
20-year member
UID 53665
Gender Male
From 广东-LianJiang
Status Offline

When this code is executed on WINDOWS2000, especially when using the NETSH command, an error message "Interface not found: Local Area Connection" will appear.
Moreover, when other batch scripts call the NETSH command to modify the gateway, IP, DNS, MASK, the prompt of "Interface not found: Local Area Connection" will also appear.
May I ask the great one, what is the reason?



I have only run it on Windows XP SP2. I haven't tested Windows 2K. The above problem should be caused by incompatibility of the kernel.
κχυμγνξοθπρωψιαδλεηφβτζσ┬╀┾┳┞┯┰┱┣┲┳╂╁│├┟┭┠这是什么??这就是我的人生
Floor 65 Posted 2007-04-20 12:21 ·  中国 湖南 衡阳 电信
新手上路
Credits 16
Posts 8
Joined 2007-04-19 06:22
19-year member
UID 85701
Gender Male
Status Offline
I don't know the reason, I can't change the IP, DNS in my XPSP2, but I have changed the machine number. The MAC is correct. If adding the automatic binding of CS-CDKEY to MAC is included, it will be perfect.
Floor 66 Posted 2007-04-20 12:35 ·  中国 广东 湛江 廉江市 电信
高级用户
★★★
Credits 959
Posts 311
Joined 2006-04-11 14:08
20-year member
UID 53665
Gender Male
From 广东-LianJiang
Status Offline
I don't know the reason, I can't change the IP, DNS in my XPSP2, but the machine number has been changed. The MAC is correct.

If the CS-CDKEY can be automatically bound to the MAC, it will be perfect.


If the MAC is correct, the file storage path is in C:\IP, which should be no problem, please check again.

I originally wanted to add this function to CS-CDKEY, but I used the CS launcher, which automatically changes CS-CDKEY when starting CS, so I didn't add it, hehe.
κχυμγνξοθπρωψιαδλεηφβτζσ┬╀┾┳┞┯┰┱┣┲┳╂╁│├┟┭┠这是什么??这就是我的人生
Floor 67 Posted 2007-04-21 02:00 ·  中国 湖南 衡阳 电信
新手上路
Credits 16
Posts 8
Joined 2007-04-19 06:22
19-year member
UID 85701
Gender Male
Status Offline
Add anti-ARP attack
:Read the local Mac address
if exist c:\\ipconfig.txt del c:\\ipconfig.txt
ipconfig /all >c:\\ipconfig.txt
if exist c:\\phyaddr.txt del c:\\phyaddr.txt
find "Physical Address" c:\\ipconfig.txt >c:\\phyaddr.txt
for /f "skip=2 tokens=12" %%M in (c:\\phyaddr.txt) do set Mac=%%M
:Read the local IP address
if exist c:\\IPAddr.txt del c:\\IPaddr.txt
find "IP Address" c:\\ipconfig.txt >c:\\IPAddr.txt
for /f "skip=2 tokens=15" %%I in (c:\\IPAddr.txt) do set IP=%%I
:Bind local IP address and MAC address
arp -s %IP% %Mac%
:Read gateway address
if exist c:\\GateIP.txt del c:\\GateIP.txt
find "Default Gateway" c:\\ipconfig.txt >c:\\GateIP.txt
for /f "skip=2 tokens=13" %%G in (c:\\GateIP.txt) do set GateIP=%%G
:Read gateway Mac address
if exist c:\\GateMac.txt del c:\\GateMac.txt
arp -a %GateIP% >c:\\GateMac.txt
for /f "skip=3 tokens=2" %%H in (c:\\GateMac.txt) do set GateMac=%%H
:Bind gateway Mac and IP
arp -s %GateIP% %GateMac%
arp -s 125.90.79.187 00-E0-4D-0F-67-11
arp -s 125.90.79.188 00-E0-4D-0F-0A-3B
arp -s 125.90.79.189 00-E0-4D-0F-0A-4B
arp -s 125.90.79.190 00-E0-4D-0D-F8-BE
Floor 68 Posted 2007-04-24 08:08 ·  中国 广东 东莞 电信
新手上路
Credits 2
Posts 1
Joined 2007-04-24 07:38
19-year member
UID 86269
Gender Male
Status Offline
Floor 69 Posted 2007-04-25 12:42 ·  中国 广西 梧州 电信
新手上路
Credits 9
Posts 4
Joined 2006-12-12 14:10
19-year member
UID 73310
Gender Male
Status Offline
I found that only "Local Area Connection" can be modified, and if it's "Local Area Connection 2", the IP cannot be changed.
Floor 70 Posted 2007-04-26 03:17 ·  中国 四川 广元 电信
新手上路
Credits 13
Posts 7
Joined 2006-10-10 05:10
19-year member
UID 65148
Gender Male
Status Offline
Practical tools!!!!!牛人 - Keren
Floor 71 Posted 2007-04-29 10:16 ·  中国 陕西 西安 电信
新手上路
Credits 4
Posts 2
Joined 2007-04-29 09:54
19-year member
UID 86881
Gender Male
Status Offline
Good stuff, support!!!
Floor 72 Posted 2007-04-30 11:15 ·  中国 河南 焦作 电信
新手上路
Credits 2
Posts 1
Joined 2007-04-30 10:09
19-year member
UID 87026
Gender Male
Status Offline
Finally able to speak
Floor 73 Posted 2007-05-02 08:38 ·  中国 云南 昆明 电信
初级用户
Credits 57
Posts 29
Joined 2006-12-27 09:36
19-year member
UID 74694
Gender Male
Status Offline
The landlord has worked hard. Special thanks to you.
Floor 74 Posted 2007-05-02 10:29 ·  中国 四川 成都 联通
新手上路
Credits 8
Posts 4
Joined 2007-04-05 23:40
19-year member
UID 84095
Gender Male
Status Offline
Thank you, the landlord. I'll download it first and take a look. If it's really useful, I'll give you extra points... But I have no right, haha!!!
Floor 75 Posted 2007-05-03 02:06 ·  中国 山西 长治 联通
初级用户
Credits 23
Posts 11
Joined 2006-12-19 09:34
19-year member
UID 73946
Gender Male
Status Offline
‹ Prev 1 3 4 5 6 7 10 Next ›
Forum Jump: