Results 1 to 9 of 9
Thread: Domain resolving script
-
12-19-2006, 12:29 PM #1Newbie
- Join Date
- Aug 2004
- Location
- Finchley, London
- Posts
- 9
Domain resolving script
Hi
Does anyone know where I can get a script to run on the server that tells me which domains still resolve to the server and which domains point elsewhere so i can remove them
Thanks
Del
-
12-19-2006, 09:08 PM #2Web Hosting Master
- Join Date
- Aug 2004
- Location
- Orlando
- Posts
- 1,280
Have you checked hotscripts.com?
http://www.hotscripts.com/search/13338611.htmleVerity.com
Celebrating 9 years of customer service. Domain names, shared/semi-dedicated/dedicated hosting, SSL certificates, merchant accounts, reseller options, and referral program, since July 2000.
-
12-19-2006, 09:12 PM #3Junior Guru
- Join Date
- Nov 2003
- Location
- UK
- Posts
- 177
try http://www.programmingtalk.com/
theres a script request section, someone there might be able to help you
-
12-20-2006, 12:47 AM #4Web Hosting Guru
- Join Date
- May 2006
- Location
- Teh Interweb
- Posts
- 314
What operating system are you running? Do you have a control panel?
[theBleeber@wht01] ~ $ cat .signature
cat: .signature: No such file or directory
-
12-20-2006, 02:14 AM #5Web Hosting Master
- Join Date
- Aug 2005
- Location
- Canada
- Posts
- 862
It will read the list of hosts form a file named 'hl'
and output the host that caused an error in 'badhosts'
The first echo and exec 2>&1 is for running as CGI and for debugging.
Code:#!/bin/sh #echo #exec 2>&1 while read -r h do host "$h" || echo "$h" >>badhosts done <hl
(Not tested)
Code:#!/bin/sh #echo #exec 2>&1 # the IP IP="123.123.123.123" while read -r h do case `host "$h"` in *$IP*) ;; *) echo "$h" >>badhosts;; esac done <hl
Last edited by extras; 12-20-2006 at 02:18 AM.
-
12-20-2006, 02:26 AM #6Web Hosting Guru
- Join Date
- May 2006
- Location
- Teh Interweb
- Posts
- 314
If you use a script such as this, you will want to ensure you are running it against external resolvers. If you host it against the same DNS server they will all return true.
[theBleeber@wht01] ~ $ cat .signature
cat: .signature: No such file or directory
-
12-20-2006, 02:35 AM #7Web Hosting Master
- Join Date
- Aug 2005
- Location
- Canada
- Posts
- 862
Oh, it's true if he runs it on the server using the same DNS.
I didn't think about that. Thank you.
Well, I guess he can edit resolv.conf, or use "dig" with @ns.whatever.com instead of "host".
Probaby, it's better to use Perl or other language, if there are lots of hosts to check ...
-
12-20-2006, 02:40 AM #8Web Hosting Guru
- Join Date
- May 2006
- Location
- Teh Interweb
- Posts
- 314
I only know because I have done it before.
[theBleeber@wht01] ~ $ cat .signature
cat: .signature: No such file or directory
-
12-20-2006, 06:47 AM #9Junior Guru Wannabe
- Join Date
- Aug 2003
- Posts
- 33
We run a simple PHP script that checks the actual nameservers (since all customers on our servers are on our specific nameservers) on a list of domains from the relevant whois. Not overly clever - but effective.
Gary