scripts
Paul Roberts
proberts at edge.edge.net
Tue Mar 11 13:04:00 EST 1997
On Thu, 6 Mar 1997, Jim Bacon wrote:
> Does anyone have scripts for maintaining the databse files that they would
> share?
(tap-tap-tap I this thing on? It's dreadfully quiet in here.)
Actually, I'm working on one as we speak, but it's more geared toward
vacuuming all the various domain and user entries down from
rwhois.internic.net... I'll send ya what I've got (in perl) once I get it
doing the whole shebang. Right now it's in two parts, and will be
three when I'm done...
The first part raids /var/named.boot (hope yours is in the same place!)
looking for every line that starts with 'primary', grabing the second
argument from the line and dumping it to a file (called 'domainz')
The second part opens up the domainz file and then repeatedly hits
rwhois.internic.net and tries to grab the record for each domain, taking
advantage of the fact that '%domain.edu' pretty much spools you the raw
data that's stored in the server, along with a pretty inconsequential
(and therefore ignored) error message.
o If it can't get the info, it puts the domain name in a file
called 'nonamez', and goes on.
o If it gets the info, it dumps it to a file with the format
'domain.name.txt'.
This is pretty much a kludge, because there are a number of things which
need to be changed, but there is virtually NO documentation I can find at
the moment about what each token means.
The nonamez and namez files are left around, because obviously the
contents of namez need to have their records pointed to the new host, and
nonamez now is a good listing of domains that need to have records added
(or not, depending on your mood).
Things left to do...
o Grab all those nifty little user entries, and vacuum them out,
too.
This code is VERY handy, because I'm sure there's more than one ISP out
there with 200+ domains like we do, and typing all those in is NOT an
option. (And since apparently you have to have an rwhois database running
to get more CIDRs from InterNIC, this can be a bit of a problem for
expansion.)
I do agree that this is a neccessary thing, though. It is oftentimes VERY
difficult to figure out who to mail about abusive users...
Note: I'm quite sure there's going to be more than one person here who
thinks that rwhois is quite self-explanatory, and that my questions are
silly. Flames will only be accepted with reasonable explanations.
Thanks. ;)
More information about the Rwhois
mailing list