linux shell 域名 ip,Shell脚本一种检查Linux中域名和IP地址所有权信息、检查多个域名的到期日期工具...
Shell腳本一種檢查L(zhǎng)inux中域名和IP地址所有權(quán)信息、檢查多個(gè)域名的到期日期工具
jwhois是一個(gè)命令行實(shí)用程序,可從whois服務(wù)器(whois數(shù)據(jù)庫(kù))中獲取有關(guān)域名所有權(quán)的信息。
Whois客戶端包含一個(gè)定義其操作的可擴(kuò)展配置文件。
WHOIS是一種查詢和響應(yīng)協(xié)議,廣泛用于收集有關(guān)注冊(cè)域名的信息。
jwhois命令是whois的先進(jìn)技術(shù),與whois命令相比,它非常快速且可高度配置。
它獲取以下信息,例如注冊(cè)人名稱,注冊(cè)人聯(lián)系方式,注冊(cè)人所在國(guó)家/地區(qū),注冊(cè)商信息,域創(chuàng)建日期,域到期日期和名稱服務(wù)器信息等。
市場(chǎng)上有很多域名擴(kuò)展,并且它是根據(jù)層次結(jié)構(gòu)劃分的。
以下兩個(gè)頂級(jí)域名非常有名,頂級(jí)域名(TLD)包括通用頂級(jí)域名(gTLD),例如.com,.info,.net,edu和.org,以及國(guó)家/地區(qū)代碼top級(jí)域名(ccTLD),例如.in,.us,.nz等。
完全合格的域名(FQDN)如下所示www.2daygeek.com.。
完全限定域名的層次結(jié)構(gòu)如下所示。
.?? ??? ?----> Root Level
|
com?? ??? ?----> Top Level Domains (TLDs)
|
2daygeek?? ?----> Second Level Domains
|
support?? ??? ?----> Sub-Domain Of Parent
如何在Linux中安裝jwhois命令?
它沒有預(yù)先安裝在您的系統(tǒng)上,并且在大多數(shù)發(fā)行版本庫(kù)中都可用。因此,我們可以輕松地安裝它。
對(duì)于Fedora系統(tǒng),請(qǐng)使用DNF命令安裝jwhois。
$ sudo dnf install jwhois
對(duì)于Debian/Ubuntu系統(tǒng),請(qǐng)使用APT-GET命令或APT命令來安裝jwhois。
$ sudo apt install jwhois
對(duì)于Arch Linux基礎(chǔ)系統(tǒng),請(qǐng)使用Pacman命令安裝jwhois。
$ sudo pacman -S jwhois
對(duì)于RHEL/CentOS系統(tǒng),請(qǐng)使用YUM命令安裝jwhois。
$ sudo yum install jwhois
對(duì)于openSUSE Leap系統(tǒng),請(qǐng)使用Zypper命令安裝jwhois。
$ sudo zypper install jwhois
如何在Linux中使用jwhois命令檢查域信息?
要獲取有關(guān)域所有權(quán)和其他信息的信息,請(qǐng)運(yùn)行以下命令。
# jwhois 2daygeek.com
[Querying whois.verisign-grs.com]
[whois.verisign-grs.com]
Domain Name: 2DAYGEEK.COM
Registry Domain ID: 1828363680_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.crazydomains.com
Registrar URL: http://www.crazydomains.com
Updated Date: 2014-08-21T16:31:39Z
Creation Date: 2013-09-21T15:47:38Z
Registry Expiry Date: 2023-09-21T15:47:38Z
Registrar: Crazy Domains FZ-LLC
Registrar IANA ID: 1291
Registrar Abuse Contact Email: abuse@crazydomains.com
Registrar Abuse Contact Phone: +61 894 220 890
Domain Status: ok https://icann.org/epp#ok
Name Server: JEAN.NS.CLOUDFLARE.COM
Name Server: VIN.NS.CLOUDFLARE.COM
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2019-04-12T03:02:44Z <<<
如何在Linux中使用jwhois命令檢查IP地址信息?
要獲取有關(guān)給定IP地址所有權(quán)和其他信息的信息,請(qǐng)運(yùn)行以下命令。
# jwhois 103.5.134.181
[Querying whois.arin.net]
[Redirected to whois.apnic.net]
[Querying whois.apnic.net]
[whois.apnic.net]
% [whois.apnic.net]
% Whois data copyright terms ? ?http://www.apnic.net/db/dbcopyright.html
% Information related to '103.5.132.0 - 103.5.135.255'
% Abuse contact for '103.5.132.0 - 103.5.135.255' is 'arunrao_erp@yahoo.com'
inetnum: ? ? ? ?103.5.132.0 - 103.5.135.255
netname: ? ? ? ?BBNL-IN
descr: ? ? ? ? ?BANGALORE BROADBAND NETWORK PVT LTD
descr: ? ? ? ? ?100 Ag's colony 4th Main road
descr: ? ? ? ? ?Anandnagar
country: ? ? ? ?IN
admin-c: ? ? ? ?BBNP1-AP
tech-c: ? ? ? ? BBNP1-AP
mnt-by: ? ? ? ? MAINT-IN-IRINN
mnt-lower: ? ? ?MAINT-BBNL-IN
mnt-routes: ? ? MAINT-BBNL-IN
mnt-irt: ? ? ? ?IRT-BBNL-IN
status: ? ? ? ? ALLOCATED PORTABLE
last-modified: ?2013-01-16T03:53:44Z
source: ? ? ? ? APNIC
irt: ? ? ? ? ? ?IRT-BBNL-IN
address: ? ? ? ?100 Ag's colony, 4th main road
e-mail: ? ? ? ? arunrao_erp@yahoo.com
abuse-mailbox: ?arunrao_erp@yahoo.com
admin-c: ? ? ? ?BBNP1-AP
tech-c: ? ? ? ? BBNP1-AP
auth: ? ? ? ? ? # Filtered
mnt-by: ? ? ? ? MAINT-BBNL-IN
last-modified: ?2017-12-01T04:58:58Z
source: ? ? ? ? APNIC
role: ? ? ? ? ? BANGALORE BROADBAND NETWORK PVT LTD - network admi
address: ? ? ? ?100 Ag's colony, 4th main road
country: ? ? ? ?IN
phone: ? ? ? ? ?+91-9980947375
e-mail: ? ? ? ? arunrao_erp@yahoo.com
admin-c: ? ? ? ?BBNP1-AP
tech-c: ? ? ? ? BBNP1-AP
nic-hdl: ? ? ? ?BBNP1-AP
mnt-by: ? ? ? ? MAINT-BBNL-IN
last-modified: ?2010-12-21T05:40:28Z
source: ? ? ? ? APNIC
% Information related to '103.5.132.0/22AS55947'
route: ? ? ? ? ?103.5.132.0/22
descr: ? ? ? ? ?ip pool of 103.5.132.0/22 for BBNL
origin: ? ? ? ? AS55947
country: ? ? ? ?IN
notify: ? ? ? ? support@bbnl.co.in
mnt-lower: ? ? ?MAINT-BBNL-IN
mnt-routes: ? ? MAINT-BBNL-IN
mnt-by: ? ? ? ? MAINT-BBNL-IN
last-modified: ?2011-11-24T05:53:50Z
source: ? ? ? ? APNIC
% This query was served by the APNIC Whois Service version 1.88.15-46 (WHOIS-JP4)
如何使用Shell腳本檢查多個(gè)域名的到期日期?
如果您有多個(gè)域名,并希望檢查這些過期日期。我建議您使用以下小型Shell腳本。
用于域到期日期檢查的Shell腳本。
# vi jwhois-check.sh
#!/bin/bash
# List You Domain Here
DOMAINS="2daygeek.com linuxtechnews.com"
for domain in $DOMAINS
do
echo -n "$domain - "
whois $domain | grep 'Expiry' | awk '{print $2,$3,$4}'
done | column -t
設(shè)置文件的可執(zhí)行權(quán)限jwhois-check.sh。
# chmod +x jwhois-check.sh
最后運(yùn)行腳本以實(shí)現(xiàn)此目的。
# sh jwhois-check.sh
2daygeek.com ? ? ? - ?Expiry ?Date: ?2023-09-21T15:47:38Z
linuxtechnews.com ?- ?Expiry ?Date: ?2020-05-19T04:16:10Z
?著作權(quán)歸作者所有,如需轉(zhuǎn)載,請(qǐng)注明出處,否則將追究法律責(zé)任
總結(jié)
以上是生活随笔為你收集整理的linux shell 域名 ip,Shell脚本一种检查Linux中域名和IP地址所有权信息、检查多个域名的到期日期工具...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux实验三shell程序设计,实验
- 下一篇: 关于linux的服务器搭建,关于搭建li