Men&Mice Perl Script to add/edit DNS Records


The following perl script will add records to a Men&Mice controlled DNS server. It only has been tested on “A” records. And Only accepts two commands, A for add and E for edit. Typing the command by itself or using the -h option will show a help message:

 ./ -h -d -m master-server -u user -p password -z zone_name -r "comment"
 -p password to M&M Central
 -m Master server default: ronin.eng.localdomain.local
 -c central server default= jumbo.eng.localdomain.local
 -s show the zone specified in -z and exit
 -l show zone history for zone specified by -z and exit
 -f file of records. see below for examples
 -e execute the edit command in the file
 -d debug mode
 -h this message
By default the records will be added to the primary server
File format examples
 "#" is a comment
 the semi-colon is necessary
 A=add E=edit
 E: 86400 A ; this is the file comment 1
 E: 86400 A ; this is the record comment.
    usually want this blank
 #E: A;
 #A: 86400 A ; will produce error if already exist
 E: 86400 A ; will produce error snce there is no ip to
     change it to.examples:
 ./ -f zonerecords.txt -c centralserver -p adminpassword -z -l
 ./ -f zonerecords.txt -c centralserver -p adminpassword -e

And here is the script:

Comments are closed.