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

Resolve domain name records that are suspended from resolution

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Demand:

IDC computer room reported that a bunch of customer interface domain names have expired for the record. I need to judge that the other side of these domain names is that the customer has suspended the resolution, and those have resolution records, and then notify the customer to suspend the domain name resolution.

Sort first to remove duplicate domain names:

Cat 2.txt | sort-rn | uniq-c | awk'{print $2}'> b.txt

Look for those in the b.txt file that still have a parsing record:

For n in `cat / root/ b.txt`; do echo $n & ping-C1-I 0.1$ n-Q | grep 'PING' | grep-v' 127.0.0.1 done

The output during execution is as follows:

[1] 38765m.z3o8i.cn [1] + Done echo $n [1] 38769m.z1w4ri.cn [1] + Done echo $n [1] 38773m.yunranfa.cnPING s.cooolyi.cn (221.195.1.103) 56 (84) bytes of data. [1] + Done echo $n [1] 38835m.yunnvjie.cnPING s.cooolyi.cn (183.60.136.216) 56 (84) Bytes of data. [1] + Done echo $n [1] 38839m.yqbyiw86.cnPING s.cooolyi.cn (183.60.136.216) 56 (84) bytes of data. [1] + Done echo $n

Append the above output to the file 11.txt file

Filter out the secondary domain names that are also resolved and begin with m:

Sed-e'/ Done/ {d}'- e'/\ [1\] / {d} '11.txt | grep-B 1' PING' | grep "^ m"

Filter out secondary domain names that are also resolved, ending with .cn and .com:

[root@localhost ~] # sed-e'/ Done/ {d}'- e'/\ [1\] / {d} '11.txt | grep-B1' PING' | grep ".cn $" | head-2m.yunranfa.cnm.yunnvjie.cn [root@localhost ~] # sed-e'/ Done/ {d}'- e'/\ [1\] / {d} '11.txt | grep-B1' PING' | grep ".com $" | head-2m.vhu5j1.comm.qeiuke.com

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

Servers

Wechat

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

12
Report