Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Quickly modify IP, mask, gateway, and dns code in batch

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Save to bat

@ echo offcolor 0Etitle Big Orange Network maintenance system echo * echo * ┏┓ ┏┓ + + echo * ┏┛┻━━━┛┻┓ + + echo * ┃ ┃ echo * ┃ ━ ┃ + + + echo * ████━████ ┃ + echo * ┃ ┃ + echo * ┃ ┻ ┃ echo * ┃ ┃ + + Big Orange Network maintenance script echo * ┗━┓ ┏━┛ echo * ┃ ┃ echo * ┃ ┃ + echo * ┃ ┃ Code is far away from bug with the Animal protectingecho * ┃ ┃ + echo * ┃ ┃ echo * ┃ ┃ + bless the immortal beast Code without bugecho * ┃ ┗━━━┓ + + echo * ┃ ┣┓ echo * ┃ ┏┛ echo * ┗┓┓┏━┳┓┏┛ + echo * ┃┫┫ ┃┫┫ echo * ┗┻┛ ┗┻┛ + + echo * echo * * @ for / f "tokens=1,2* delims=:"% an in ('ipconfig ^ | findstr "IP Address"') do set ip=% % becho.. address:% IP%.. pause > nul@set / p c=:@netsh interface ipv4 set address Local connection static 192.168.23% c% 255.255.252.0 192.168.23.1 > nul 2 > nul@netsh Interface ipv4 set dns Local connection static 202.96.128.86 > nul 2 > nul@netsh interface ipv4 add dns Local connection 202.96.128.166 index=2 > nul 2 > nulrem echo.... new address:%ip%..echo. .The ip address is set successfully. Press any key to exit. .. pause > nulipconfig/all

This is the first time I wrote it, but later I found that it was still a little unintelligent.

So, I improved it in my spare time.

@ echo offcolor 0Etitle big orange network maintenance system By: big orange echo * echo * ┏┓ ┏┓ + + echo * ┏┛┻━━━┛┻┓ + + echo * ┃ ┃ echo * ┃ ━ ┃ + + + echo * ████━████ ┃ + echo * ┃ ┃ + echo * ┃ ┻ ┃ echo * ┃ ┃ + + Big Orange Network maintenance script echo * ┗━┓ ┏━┛ echo * ┃ ┃ echo * ┃ ┃ + echo * ┃ ┃ Code is far Away from bug with the animal protectingecho * ┃ ┃ + echo * ┃ ┃ echo * ┃ ┃ + bless the immortal beast Code without bugecho * ┃ ┗━━━┓ + + echo * ┃ ┣┓ echo * ┃ ┏┛ echo * ┗┓┓┏━┳┓┏┛ + echo * ┃┫┫ ┃┫┫ echo * ┗┻┛ ┗┻┛ + + echo * echo * * ping / n 2 127.1 > nulset Num=100set N=0:strset / a n=%n%+1if "% n%" = "% Num%" Goto end@for / f "tokens=1,2* delims=:" an in ('ipconfig ^ | findstr "IP Address"') do set ip=%%becho.. address:%ip%..rem echo% ip:~0,11%set trunIp=%ip:~0,11% Rem echo% trunIp%if 192.168.23 percent percent trunIp% (ping www.baidu.com-t-n 10echo ip set is Goodluck echo Please press Enter to exit! Pause > nulexit) else (@ echo.. IP In settings..) Echo * echo * ┏┓ ┏┓ + + echo * ┏┛┻━━━┛┻┓ + + echo * ┃ ┃ echo * ┃ ━ ┃ + + + echo * ████━████ ┃ + echo * ┃ ┃ + echo * ┃ ┻ ┃ echo * ┃ ┃ + + big orange network maintenance script echo * ┗━┓ ┏━┛ echo * ┃ ┃ echo * ┃ ┃ + echo * ┃ ┃ Code is far away from bug with the animal protectingecho * ┃ ┃ + echo * ┃ ┃ echo * ┃ ┃ + bless the immortal beast Code without bugecho * ┃ ┗━━━┓ + + echo * ┃ ┣┓ echo * ┃ ┏┛ echo * ┗┓┓┏━┳┓┏┛ + echo * ┃┫┫ ┃┫┫ echo * ┗┻┛ ┗┻┛ + + echo * echo * * pause > nul@set / p c=:@netsh interface ipv4 set address Local connection static 192.168.23% c% 255. 255.252.0 192.168.23.1 > nul 2 > nul@netsh interface ipv4 set dns Local connection static 202.96.128.86 > nul 2 > nul@netsh interface ipv4 add dns Local connection 202.96.128.166 index=2 > nul 2 > nulping / n 5 127.1 > nul@for / f "tokens=1,2* delims=:"% an in ('ipconfig ^ | findstr "IP Address"') do set ip=%%becho.... new address:%ip %.. echo others ip address is set successfully. Press any key to exit. .. goto strpause > nulipconfig/all

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report