#!/usr/bin/perl
####################################################################################################
# DNS ALERT
# Copyright Psybercore.com, Inc.						info@superscripts.com                                                 		
####################################################################################################
# COPYRIGHT NOTICE                                                           
# Copyright Psybercore.com, INC - All Rights Reserved.                    
# http://www.superscripts.com                                                                                                            
# Selling the code for this program, modifying or redistributing this software over the Internet or 
# in any other medium is forbidden.  Copyright and header may not be modified
#
# My name is drew star... and i am funky...  http://www.drewstar.com/
#
####################################################################################################
This tool is for webmasters that are sick of having to try and keep track of 1000 domains all the time
and remember what is due when.

HOW TO INSTALL AND OTHER MISC NOTES

Unpack tarball
Set path to perl at top of dnsalert.cgi
Create directory inside cgi-bin called dnsalert
Upload ALL files into this folder
chmod dnsalert.cgi to 755
chmod all other files to 666 or 777

Install Whois Raw Module (see tutorial for module installation)
	Otherwise by telnet type inside the directory
	tar xvf Net-Whois-Raw-0.20.tar
	perl Makefile.PL
	make
	make install

Set variables inside dnsalert.cgi

$warning = "30";
$dadomaindatabase = "/full/path/to/dnsalert/domains.txt";
$live = "/full/path/to/dnsalert/live.txt";
$dead = "/full/path/to/dnsalert/dead.txt";
$register = "/full/path/to/dnsalert/register.txt";
$mailprogram = "/usr/sbin/sendmail";
$webmasteremail = "webmaster\@yourdomain.com";

$webmasteremail is your email address obviously...

$mailprogram is the PATH TO SENDMAIL (usually /usr/sbin/sendmail, or /usr/bin/sendmail, or /usr/lib/sendmail)

$warning is the number of days you want to be notified in advance of a registration
expiration (30 is 30 days)

The rest are paths to files which are defined and used as follows

domains.txt is the list of ALL your domain names one per line like this

domain1.com
domain2.com
domain3.com
etc...

live, dead, and register are CREATED when dnsalert.cgi runs either manually by telnet
or the browser if you configure it that way or preferably by CRONTAB.  These files will
sort out the domains which are DEAD and FREELY AVAILABLE into the dead.txt file.  The domains
which are not in need of attention are sorted into live.txt file and also show how many days
are left until they expire.  register.txt contains the names of all the domain names that are
IN DANGER OF EXPIRATION (within the $warning window) and need to be registered.

See the tutorial section for setting up crontab files if you don't already know how.
