AoA
Hi Everybody!
I have a problem in creating a script for checking a list of domains against whois records.
e.g, list of domains
www.abc.com
www.def.com.pk
www.ghi.edu
.....
.....
I have to create a bash script, which will check each domain against its whois record and display some information from it, e.g, Domain Expiry date, related nameservers, etc...
when I manually check a domain name against whois in Bash, e.g,
whois www.yahoo.com
It gives error no match for domain www.yahoo.com.
I am using RHEL 4. I am creating this script on my DNS server. where I purify these domians from my named.conf. i have done all this task of purifying domains names, but now I have to do whois against each domain name.
Kindly help in this regard.
Thanks and Regards,
Shakeel
List of Domains to do whois
-
- Naik
- Posts: 64
- Joined: Sat Dec 04, 2004 6:30 pm
- Location: Islamabad, Pakistan.
List of Domains to do whois
* * *
Shakeel Ahmed
Registered Linux User # 423792
"The Shortest Distance b/w a Problem & its solution, is distance between ur Knees & the Floor. The one who kneels to Allah can stand upto anything!!"
Shakeel Ahmed
Registered Linux User # 423792
"The Shortest Distance b/w a Problem & its solution, is distance between ur Knees & the Floor. The one who kneels to Allah can stand upto anything!!"
that's probably because www.yahoo.com isn't a domain. yahoo.com is the domain.
what do you mean by "purify"?
what do you mean by "purify"?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
-
- Naik
- Posts: 64
- Joined: Sat Dec 04, 2004 6:30 pm
- Location: Islamabad, Pakistan.
Thanks Lambda, for your kind reply.
But this service only checks for .COM, .NET, and .EDU domains. Other domains cannot be checked here.
What is the possible solution, for checking all the domains in the list that can be of any type means, .com, .com.pk, .org, etc. in the bash through a script.
"Purify" means that I extracted the domains from the named.conf file where there is many other information.
Regards,
But this service only checks for .COM, .NET, and .EDU domains. Other domains cannot be checked here.
What is the possible solution, for checking all the domains in the list that can be of any type means, .com, .com.pk, .org, etc. in the bash through a script.
"Purify" means that I extracted the domains from the named.conf file where there is many other information.
Regards,
* * *
Shakeel Ahmed
Registered Linux User # 423792
"The Shortest Distance b/w a Problem & its solution, is distance between ur Knees & the Floor. The one who kneels to Allah can stand upto anything!!"
Shakeel Ahmed
Registered Linux User # 423792
"The Shortest Distance b/w a Problem & its solution, is distance between ur Knees & the Floor. The one who kneels to Allah can stand upto anything!!"
.pk doesn't have a whois service. supposedly they'll add one, but until then, you'll have to do something likeoryou probably should write a script in python or something to parse the output and fetch the fields you want.
please don't use the term 'purify' in that context. if your goal is to check if the domains listed in your named.conf file use your nameserver or not, you can easily ask the parent nameservers. for example, typeto get pk's nameservers, and then ask one of them:do the same forand
the parent nameservers change very rarely -- maybe once every few years.
Code: Select all
curl http://pk5.pknic.net.pk/pk5/lookup.PK?name=something.pk'
Code: Select all
lynx -dump 'http://pk5.pknic.net.pk/pk5/lookup.PK?name=something.pk'
please don't use the term 'purify' in that context. if your goal is to check if the domains listed in your named.conf file use your nameserver or not, you can easily ask the parent nameservers. for example, type
Code: Select all
host -t ns pk.
Code: Select all
host -t ns google.com.pk. m-2.pknic.net.pk.
Code: Select all
host -t ns com.
Code: Select all
host -t ns example.com. a.gtld-servers.net.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
-
- Naik
- Posts: 64
- Joined: Sat Dec 04, 2004 6:30 pm
- Location: Islamabad, Pakistan.