whois parser and report generator

Baby Peanut baby_p_nut2 at yahoo.com
Thu Feb 5 15:29:26 UTC 2004


Do you work for a bureaucracy?
Do they have too many zones?
Are they registered with random providers?
Do they expire whenever and ever?
Does it drive you crazy? :) (like me)

Would you like a report generator that produces:

02/05/04 zone1.com Record expires on 03_Mar_2004 in 26 days
02/05/04 zone2.com Record expires on 07_Mar_2004 in 30 days
02/05/04 zone3.com Record expires on 07_Mar_2004 in 30 days
02/05/04 zone4.com Record expires on 18_Mar_2004 in 41 days
02/05/04 zone5.com Record expires on 20_Mar_2004 in 43 days
02/05/04 zone5.net Record expires on 23_Mar_2004 in 46 days
[...etc...]

Well I have a program that parses BIND8 named.conf including includes
and slowly looks up the whois records (whois is rate-throttled these
days) and parses the absurd output (no standard!)

The parser can currently handle:

"End registration date- YYYY-MM-DD"
"End registration date: MMM DD YYYY HH:MM:SS"
"Expires on..............: DD MMM YYYY HH:MM:SS"
"Expires after:       YYYY-MM-DD HH:MM:SS.F"
"Expires on: DD-MMM-YY"
"Expires on: DDD, MMM DD, YYYY"
"Record Expires: MM/DD/YYYY"

You may have to add more formats depending on your provider's whois
output.

Currently only tested on FreeBSD 4.* and BIND 8.*

If there's any interest I'll roll a distribution tarball.

I don't read the E-mail address listed above, please post.  If you
can't post to comp.protocols.dns.bind try misc.health.aids, I read
that one a lot.


More information about the bind-users mailing list