|
|
本帖最后由 pcl_test 于 2016-1-14 16:17 编辑
用批处理Nslookup批量查询域名并且输出解析出来的IPv4到指定文本
例
domain.txt
————————————————————
sz.tencent.com
sz2.tencent.com
sz3.tencent.com
sz4.tencent.com
sz5.tencent.com
————————————————————
dns.txt
————————————————————
114.114.114.114
114.114.115.115
223.5.5.5
223.6.6.6
180.76.76.76
————————————————————
domain.txt 里面的每行域名都用 dns.txt每行的DNS服务器查询一遍,然后输出查询到的IPv4到指定文本,如果已经存在则不添加。
nslookup sz.tencent.com 114.114.114.114 只取解析到的IP
________________________________
服务器: public1.114dns.com
Address: 114.114.114.114
非权威应答:
名称: sz.tencent.com
Addresses: 111.161.88.16
111.161.88.38
111.161.88.29
111.161.88.12
111.161.88.17
111.161.88.13
111.161.88.31
111.161.88.30
111.161.88.27
111.161.88.28
111.161.88.15
111.161.88.18
111.161.88.14
111.161.88.11
111.161.88.32
111.161.88.34
________________________________
nslookup sz.tencent.com 114.114.114.114
nslookup sz.tencent.com 114.114.115.115
nslookup sz.tencent.com 223.5.5.5
nslookup sz.tencent.com 223.6.6.6
nslookup sz.tencent.com 180.76.76.76 |
|