Tuesday, June 26, 2012

NixDZoneX00101010.py DNS Zone Transfer tool!

After designing and creating this tool from scratch, I decided to release it to the public.

The creation of this program was inspired by some of the innovative people over @HS I get along with and the fact that I will receive extra credit in a class I'm taking for writing it.

I will be adding support to the program so this can be used on Windows. I coded this OS specific.

When I have additional need for functionality is when version updates will be available for NizDZone42(...Yes the ones and zeros in the name meant something), although I dont expect this to be used by a large populous, I would appreciate the credit if you use my code!


import subprocess

import time

#NixDZoneX00101010 << Thats 42 in decimal..Learn binary! : p

#Written by G#42

#May 2012

print "\n[***] Welcome to the NixDZoneX00101010.py DNS Zone Transfer tool![***]\n\n[!!!] *nix OS HOST utility must be installed for this program to function properly.[!!!]\n[*] Windows support will come when I have a need for it!\n"

def osChoice(): #Selecting options

    while True:

        osChoice = raw_input("[*] Please select an option!\n\n[*] linux\n[*] exit\n>")

        osChoice = osChoice.lower()

        if osChoice == "linux":

            print "\n[*] UNIX/LINUX DNS client chosen!\n"

            return osChoice


        elif osChoice == "exit":

            return osChoice


            print "[!!!] You entered %s. Please select a proper option from the menu!"% osChoice

def linuxDNS(): #Executes host command to attempt DNS Zone xfer

    domain = raw_input("\n[*] Please enter the domain name you would like to attempt a DNS zone transfer for.\n>")

    server = raw_input("\n[*] Please enter the authorative DNS server IPv4 address for the specified domain. \n>")

    print "\n[*] You supplied the following input.\n[*] DOMAIN: %s\n[*] Authorative Name Server for %s: %s\n\n[*] Please wait while we attempt your zone transfer.\n"% (domain,domain,server)



        zoneX = subprocess.Popen(["host", "-l", domain, server], shell=False)

        results = zoneX.communicate()

        if zoneX.returncode == 0:

            print results


        print "\n[!!!] ERROR [!!!]\n"

def main():

    choice = osChoice()

    if choice == "linux":



        print "\n[*] So thats it? I was sleeping....You are now exiting the program\n"

#Top-level script environment

if __name__ == "__main__":


No comments:

Post a Comment