Donnerstag, 13. September 2018

DNS Brute Subdomain

Kullanımı :

Kod:
python subScan.py
Kaynak Kod :

Kod:
# -*- coding: utf-8 -*-
#Author : A1peren
#All copyrights to KoDa / TurkHackteam
#!/usr/bin/python/
import socket, sys, os, time
banner = """
 ____             _       ____  _   _ ____                 
| __ ) _ __ _   _| |_ ___|  _ \| \ | / ___|  ___ __ _ _ __ 
|  _ \| '__| | | | __/ _ \ | | |  \| \___ \ / __/ _` | '_ \
| |_) | |  | |_| | ||  __/ |_| | |\  |___) | (_| (_| | | | |
|____/|_|   \__,_|\__\___|____/|_| \_|____/ \___\__,_|_| |_|
                                            Author: KoDa
"""
if len(sys.argv)==2:
    pass
else:
    try:
        os.system("clear")
    except:
        os.system("cls")
    print(banner)
    exit("Usage: python "+sys.argv[0]+" <target>\n\n")
def subScan(host):
    print(banner)
    print("Host script results:\n| dns-brute: \n|   DNS Brute-force hostnames: \n|")
    try:
        ip = socket.gethostbyname( host )
        print("|     "+host+" - "+ip+" - "+time.ctime().split(" ")[3]+"\n|")
    except:
        exit("ERROR:\n      Not Connected the server !")
    liste = ["mail.","ftp.","cpanel.","webmail."]
    for i in liste:
        try:
            new_host=i+host
            ip = socket.gethostbyname(new_host)
            print("|     "+new_host+" - "+ip+" - "+time.ctime().split(" ")[3]+"\n|")
        except:
            pass
    print("-"*20+"\n\n")
subScan(str(sys.argv[1]).replace("https://","").replace("http://","").replace("www.","").replace("/",""))

Keine Kommentare:

Kommentar veröffentlichen