18944 Windoom Smp 188165192166:25565 17/40
18937 MineRealm [24/7] [Legit] - Founded Oct, 2010 gameminerealmcom:25565 56/150
18926 [AUS] Mikeland Survival jiwacomau:25565 66/100
18923 CloudCraft SMP [Multiworlds/Creative/Survival/R mccloudcraftfunnet:25565 22/40
18922 █★█ NyanCRAFT ◄|► 173|RPG|TOWNY|1000+ MEMBERS nyancraftcom:25565 N/A
1891 SoftEggLand 7117823250:25565 N/A
18897 [AUS] Mikeland Factions jiwacomau:25567 36/100
18885 Dirkocraft - Friendly, fun, legit Check us out! dirkocraftcom:25565 16/70
18885 [AUS]Mikeland Creative jiwacomau:25566 7/60
18882 USZRT Main uszrtcom:25565 17/40
18872 RinicCraft - German Survival[17][RPG] rinicde:25565 5/45
18871 mcPlugPayPlaycom || [SMP] [Bukkit] [200 Slot mcPlugPayPlaycom:25565 5/200
1887 Helicraft Reloaded shinyheliwrnet:25565 0/15
18869 ›™iCraftSMP™ introducing›Towny~Jobs~Max= 30 :] icraftsmpcom:20023 0/20
18861 Dynamo MC 17 Brand New! [Ded] [24/7] [modified sc5servercraftco:7059 2/30
18858 The Minecrafter Server [Survival] sminecraftercom:25565 2/200
18841 ULTIMATEMINECRAFT | 24/7 DEDICATED SERVER | NO ultimateminecraftnet:25565 21/70
18828 «» World of Minecraft «» PVP-Arena «» 60 Slots minenopolyde:25565 3/60
18821 Hollowworld - Medieval / Fantasy Themed minecrafthollowworldcouk:1701 9/40
18814 Frantic Me! [Vanilla][Build Rights][24/7][17] mcfranticmecom:25565 13/64
18811 ░▒▓█JustGamer's RPG Server - [24/7][Ventrilo][ jgrpgdyndnsorg:25565 11/50
18807 simplicitypet▲Pseudo-vanilla anarchy▲Griefi simplicitypet:25565 4/35
18804 Mr Minecraft's PVP Server pvpmrminecraftnet:25565 11/50
18798 ██►█ Creative NO-signup Factions█◄██ 696439248:25565
可以通过判断IP地址的范围来过滤掉内网IP,一般来说,内网IP地址的范围如下:
10000 ~ 10255255255
1721600 ~ 17231255255
19216800 ~ 192168255255
如果你想只选择动态公网IP,可以使用以下方法:
在脚本中通过ipconfig命令获取本机的IP地址。
通过判断IP地址的范围,如果是内网IP则忽略,否则将其作为动态公网IP。
下面是一个示例代码:
@echo offsetlocal enabledelayedexpansion
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr /i "IPv4"') do (
set ip=%%a
set ip=!ip: =!
set ip=!ip:IPv4 Address=!
set ip=!ip:/=!
set /a oct1=!ip:~0,3!, oct2=!ip:~3,3!, oct3=!ip:~6,3!, oct4=!ip:~9,3!
if !oct1! neq 10 if !oct1! neq 172 if not !oct1!==192 if !oct1! neq 127 (
echo !ip! is a dynamic public IP address
) else (
echo !ip! is a private IP address
)
)
在这个示例代码中,我们使用ipconfig命令获取本机的IP地址,然后使用findstr命令过滤出IPv4地址。接着,我们将IP地址按点号分割成四个部分,并通过判断第一部分的值来确定是否为内网IP。如果第一部分的值为10、172、192或127,则说明这是一个内网IP,否则说明这是一个动态公网IP。最后,我们使用echo命令输出结果。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)