Get the App
SLTechnology News&Howtos  ›  Servers  › 

Resolve domain name records that are suspended from resolution

Shulou Source: shulou.com Published: 2022-06-02 18:46:45 09月30日 Update

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

Tags: Domain name customer file second-level domain name content output beginning interface computer room process or demand face sort Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB vpn MySQL Xiaomi Shulou Tech Info