May 10, 2010

BAT的FOR循环批量抓取Youtube缓存服务器的v6地址

今天凌晨发现冰临宸夏ipv6 hosts又更新了,大部分换上了悉尼的服务器,ping速快了不少,但截至5月10日,Youtube缓存服务器的悉尼地址仍然没有更新,好吧,还是自己动手吧。


想了想我也没啥工具会用的,那就用系统的nslookup吧。Youtube缓存服务器的名字非常有规律,一律形如:

v%i.lscache%j.c.youtube.com (i,j为正整数,1<=i<=24,1<=j<=8) 于是配合BAT里古老的For循环:
echo start> .\result.txt
for /l %%i in (1,1,24) do for /l %%j in (1,1,8) do nslookup -qt=AAAA "v%%i.lscache%%j.c.youtube.com" 2001:470:20::2 >>.\result.txt

第一行,相当于在当前目录创建result.txt
第二行,用两重for循环,查询缓存服务器的ip,这里用的DNS是he提供的IPV6 DNS

这样得到result.txt用UltraEdit整理后就能得到下面的结果啦

2404:6800:4001::10 v1.lscache1.c.youtube.com
2404:6800:4001::10 v1.lscache2.c.youtube.com
2404:6800:4001::10 v1.lscache3.c.youtube.com
2404:6800:4001::10 v1.lscache4.c.youtube.com
2404:6800:4001:1::10 v1.lscache5.c.youtube.com
2404:6800:4001::10 v1.lscache6.c.youtube.com
2404:6800:4001::10 v1.lscache7.c.youtube.com
2404:6800:4001::10 v1.lscache8.c.youtube.com
2404:6800:4001:1::13 v2.lscache1.c.youtube.com
2404:6800:4001:1::13 v2.lscache2.c.youtube.com
2404:6800:4001::13 v2.lscache3.c.youtube.com
2404:6800:4001:1::13 v2.lscache4.c.youtube.com
2404:6800:4001::13 v2.lscache5.c.youtube.com
2404:6800:4001::13 v2.lscache6.c.youtube.com
2404:6800:4001::13 v2.lscache7.c.youtube.com
2404:6800:4001::13 v2.lscache8.c.youtube.com
2404:6800:4001::16 v3.lscache1.c.youtube.com
2404:6800:4001::16 v3.lscache2.c.youtube.com
2404:6800:4001::16 v3.lscache3.c.youtube.com
2404:6800:4001::16 v3.lscache4.c.youtube.com
2404:6800:4001::16 v3.lscache5.c.youtube.com
2404:6800:4001::16 v3.lscache6.c.youtube.com
2404:6800:4001:1::16 v3.lscache7.c.youtube.com
2404:6800:4001::16 v3.lscache8.c.youtube.com
2404:6800:4001::19 v4.lscache1.c.youtube.com
2404:6800:4001:1::19 v4.lscache2.c.youtube.com
2404:6800:4001::19 v4.lscache3.c.youtube.com
2404:6800:4001::19 v4.lscache4.c.youtube.com
2404:6800:4001::19 v4.lscache5.c.youtube.com
2404:6800:4001::19 v4.lscache6.c.youtube.com
2404:6800:4001::19 v4.lscache7.c.youtube.com
2404:6800:4001::19 v4.lscache8.c.youtube.com
2404:6800:4001::1c v5.lscache1.c.youtube.com
2404:6800:4001:1::1c v5.lscache2.c.youtube.com
2404:6800:4001::1c v5.lscache3.c.youtube.com
2404:6800:4001:1::1c v5.lscache4.c.youtube.com
2404:6800:4001::1c v5.lscache5.c.youtube.com
2404:6800:4001::1c v5.lscache6.c.youtube.com
2404:6800:4001::1c v5.lscache7.c.youtube.com
2404:6800:4001::1c v5.lscache8.c.youtube.com
2404:6800:4001::1f v6.lscache1.c.youtube.com
2404:6800:4001::1f v6.lscache2.c.youtube.com
2404:6800:4001::1f v6.lscache3.c.youtube.com
2404:6800:4001::1f v6.lscache4.c.youtube.com
2404:6800:4001::1f v6.lscache5.c.youtube.com
2404:6800:4001::1f v6.lscache6.c.youtube.com
2404:6800:4001::1f v6.lscache7.c.youtube.com
2404:6800:4001:1::1f v6.lscache8.c.youtube.com
2404:6800:4001::22 v7.lscache1.c.youtube.com
2404:6800:4001::22 v7.lscache2.c.youtube.com
2404:6800:4001::22 v7.lscache3.c.youtube.com
2404:6800:4001:1::22 v7.lscache4.c.youtube.com
2404:6800:4001::22 v7.lscache5.c.youtube.com
2404:6800:4001:1::22 v7.lscache6.c.youtube.com
2404:6800:4001::22 v7.lscache7.c.youtube.com
2404:6800:4001::22 v7.lscache8.c.youtube.com
2404:6800:4001::25 v8.lscache1.c.youtube.com
2404:6800:4001::25 v8.lscache2.c.youtube.com
2404:6800:4001:1::25 v8.lscache3.c.youtube.com
2404:6800:4001::25 v8.lscache4.c.youtube.com
2404:6800:4001:1::25 v8.lscache5.c.youtube.com
2404:6800:4001::25 v8.lscache6.c.youtube.com
2404:6800:4001::25 v8.lscache7.c.youtube.com
2404:6800:4001:1::25 v8.lscache8.c.youtube.com
2404:6800:4001::11 v9.lscache1.c.youtube.com
2404:6800:4001::11 v9.lscache2.c.youtube.com
2404:6800:4001::11 v9.lscache3.c.youtube.com
2404:6800:4001:1::11 v9.lscache4.c.youtube.com
2404:6800:4001:1::11 v9.lscache5.c.youtube.com
2404:6800:4001::11 v9.lscache6.c.youtube.com
2404:6800:4001::11 v9.lscache7.c.youtube.com
2404:6800:4001::11 v9.lscache8.c.youtube.com
2404:6800:4001::14 v10.lscache1.c.youtube.com
2404:6800:4001::14 v10.lscache2.c.youtube.com
2404:6800:4001::14 v10.lscache3.c.youtube.com
2404:6800:4001::14 v10.lscache4.c.youtube.com
2404:6800:4001::14 v10.lscache5.c.youtube.com
2404:6800:4001::14 v10.lscache6.c.youtube.com
2404:6800:4001:1::14 v10.lscache7.c.youtube.com
2404:6800:4001::14 v10.lscache8.c.youtube.com
2404:6800:4001::17 v11.lscache1.c.youtube.com
2404:6800:4001::17 v11.lscache2.c.youtube.com
2404:6800:4001::17 v11.lscache3.c.youtube.com
2404:6800:4001::17 v11.lscache4.c.youtube.com
2404:6800:4001::17 v11.lscache5.c.youtube.com
2404:6800:4001::17 v11.lscache6.c.youtube.com
2404:6800:4001::17 v11.lscache7.c.youtube.com
2404:6800:4001::17 v11.lscache8.c.youtube.com
2404:6800:4001::1a v12.lscache1.c.youtube.com
2404:6800:4001:1::1a v12.lscache2.c.youtube.com
2404:6800:4001::1a v12.lscache3.c.youtube.com
2404:6800:4001::1a v12.lscache4.c.youtube.com
2404:6800:4001::1a v12.lscache5.c.youtube.com
2404:6800:4001::1a v12.lscache6.c.youtube.com
2404:6800:4001::1a v12.lscache7.c.youtube.com
2404:6800:4001::1a v12.lscache8.c.youtube.com
2404:6800:4001::1d v13.lscache1.c.youtube.com
2404:6800:4001::1d v13.lscache2.c.youtube.com
2404:6800:4001::1d v13.lscache3.c.youtube.com
2404:6800:4001::1d v13.lscache4.c.youtube.com
2404:6800:4001:1::1d v13.lscache5.c.youtube.com
2404:6800:4001::1d v13.lscache6.c.youtube.com
2404:6800:4001::1d v13.lscache7.c.youtube.com
2404:6800:4001::1d v13.lscache8.c.youtube.com
2404:6800:4001::20 v14.lscache1.c.youtube.com
2404:6800:4001::20 v14.lscache2.c.youtube.com
2404:6800:4001::20 v14.lscache3.c.youtube.com
2404:6800:4001::20 v14.lscache4.c.youtube.com
2404:6800:4001::20 v14.lscache5.c.youtube.com
2404:6800:4001::20 v14.lscache6.c.youtube.com
2404:6800:4001::20 v14.lscache7.c.youtube.com
2404:6800:4001:1::20 v14.lscache8.c.youtube.com
2404:6800:4001::23 v15.lscache1.c.youtube.com
2404:6800:4001::23 v15.lscache2.c.youtube.com
2404:6800:4001::23 v15.lscache3.c.youtube.com
2404:6800:4001:1::23 v15.lscache4.c.youtube.com
2404:6800:4001::23 v15.lscache5.c.youtube.com
2404:6800:4001:1::23 v15.lscache6.c.youtube.com
2404:6800:4001::23 v15.lscache7.c.youtube.com
2404:6800:4001::23 v15.lscache8.c.youtube.com
2404:6800:4001::26 v16.lscache1.c.youtube.com
2404:6800:4001::26 v16.lscache2.c.youtube.com
2404:6800:4001:1::26 v16.lscache3.c.youtube.com
2404:6800:4001::26 v16.lscache4.c.youtube.com
2404:6800:4001::26 v16.lscache5.c.youtube.com
2404:6800:4001::26 v16.lscache6.c.youtube.com
2404:6800:4001::26 v16.lscache7.c.youtube.com
2404:6800:4001::26 v16.lscache8.c.youtube.com
2404:6800:4001::12 v17.lscache1.c.youtube.com
2404:6800:4001::12 v17.lscache2.c.youtube.com
2404:6800:4001::12 v17.lscache3.c.youtube.com
2404:6800:4001::12 v17.lscache4.c.youtube.com
2404:6800:4001::12 v17.lscache5.c.youtube.com
2404:6800:4001::12 v17.lscache6.c.youtube.com
2404:6800:4001::12 v17.lscache7.c.youtube.com
2404:6800:4001::12 v17.lscache8.c.youtube.com
2404:6800:4001:1::15 v18.lscache1.c.youtube.com
2404:6800:4001:1::15 v18.lscache2.c.youtube.com
2404:6800:4001::15 v18.lscache3.c.youtube.com
2404:6800:4001::15 v18.lscache4.c.youtube.com
2404:6800:4001::15 v18.lscache5.c.youtube.com
2404:6800:4001::15 v18.lscache6.c.youtube.com
2404:6800:4001:1::15 v18.lscache7.c.youtube.com
2404:6800:4001::15 v18.lscache8.c.youtube.com
2404:6800:4001:1::18 v19.lscache1.c.youtube.com
2404:6800:4001::18 v19.lscache2.c.youtube.com
2404:6800:4001:1::18 v19.lscache3.c.youtube.com
2404:6800:4001:1::18 v19.lscache4.c.youtube.com
2404:6800:4001::18 v19.lscache5.c.youtube.com
2404:6800:4001::18 v19.lscache6.c.youtube.com
2404:6800:4001::18 v19.lscache7.c.youtube.com
2404:6800:4001::18 v19.lscache8.c.youtube.com
2404:6800:4001::1b v20.lscache1.c.youtube.com
2404:6800:4001::1b v20.lscache2.c.youtube.com
2404:6800:4001::1b v20.lscache3.c.youtube.com
2404:6800:4001::1b v20.lscache4.c.youtube.com
2404:6800:4001:1::1b v20.lscache5.c.youtube.com
2404:6800:4001::1b v20.lscache6.c.youtube.com
2404:6800:4001::1b v20.lscache7.c.youtube.com
2404:6800:4001::1b v20.lscache8.c.youtube.com
2404:6800:4001::1e v21.lscache1.c.youtube.com
2404:6800:4001::1e v21.lscache2.c.youtube.com
2404:6800:4001:1::1e v21.lscache3.c.youtube.com
2404:6800:4001::1e v21.lscache4.c.youtube.com
2404:6800:4001::1e v21.lscache5.c.youtube.com
2404:6800:4001:1::1e v21.lscache6.c.youtube.com
2404:6800:4001::1e v21.lscache7.c.youtube.com
2404:6800:4001::1e v21.lscache8.c.youtube.com
2404:6800:4001::21 v22.lscache1.c.youtube.com
2404:6800:4001::21 v22.lscache2.c.youtube.com
2404:6800:4001::21 v22.lscache3.c.youtube.com
2404:6800:4001::21 v22.lscache4.c.youtube.com
2404:6800:4001:1::21 v22.lscache5.c.youtube.com
2404:6800:4001::21 v22.lscache6.c.youtube.com
2404:6800:4001::21 v22.lscache7.c.youtube.com
2404:6800:4001::21 v22.lscache8.c.youtube.com
2404:6800:4001:1::24 v23.lscache1.c.youtube.com
2404:6800:4001::24 v23.lscache2.c.youtube.com
2404:6800:4001::24 v23.lscache3.c.youtube.com
2404:6800:4001::24 v23.lscache4.c.youtube.com
2404:6800:4001::24 v23.lscache5.c.youtube.com
2404:6800:4001::24 v23.lscache6.c.youtube.com
2404:6800:4001::24 v23.lscache7.c.youtube.com
2404:6800:4001::24 v23.lscache8.c.youtube.com
2404:6800:4001::27 v24.lscache1.c.youtube.com
2404:6800:4001::27 v24.lscache2.c.youtube.com
2404:6800:4001::27 v24.lscache3.c.youtube.com
2404:6800:4001::27 v24.lscache4.c.youtube.com
2404:6800:4001:1::27 v24.lscache5.c.youtube.com
2404:6800:4001::27 v24.lscache6.c.youtube.com
2404:6800:4001::27 v24.lscache7.c.youtube.com
2404:6800:4001:1::27 v24.lscache8.c.youtube.com

No comments:

Post a Comment

Related

Related Posts with Thumbnails