Пример #1
0
    def os_scan():
        print(
            "______________________________________________________________________"
        )

        os_host = input(
            conf.colored(
                "\nEnter the IP you want to find the operating system of: ",
                "green",
                attrs=["bold"],
            ))
        os_output = input(
            conf.colored(
                f"Enter the output folder - [default: reports/Nmap/{os_host}/]: ",
                "green",
                attrs=["bold"],
            ))
        os_ip = conf.socket.gethostbyname(os_host)

        conf.not_valid(os_scan, os_host)
        os_output = conf.dir_output(os_output, "reports/Nmap/", os_host)
        conf.create_dir(os_output)

        print(
            "______________________________________________________________________"
        )

        conf.os.system(f"sudo nmap -O {os_ip} -o {os_output}/osscan.txt")

        print(
            "______________________________________________________________________"
        )
Пример #2
0
    def udp_scan():
        print(
            "______________________________________________________________________"
        )

        udp_host = input(
            conf.colored(
                "\nEnter the IP you want to Scan the ports of: ",
                "green",
                attrs=["bold"],
            ))
        udp_output = input(
            conf.colored(
                f"Enter the output folder - [default: reports/Nmap/{udp_host}/]: ",
                "green",
                attrs=["bold"],
            ))
        udp_ip = conf.socket.gethostbyname(udp_host)

        conf.not_valid(udp_scan, udp_host)
        udp_output = conf.dir_output(udp_output, "reports/Nmap/", udp_host)
        conf.create_dir(udp_output)

        print(
            "______________________________________________________________________"
        )

        conf.os.system(f"sudo nmap -sU {udp_ip} -o {udp_output}/udpscan.txt")

        print(
            "______________________________________________________________________"
        )
Пример #3
0
    def net_scan():
        conf.clear()

        print(
            "______________________________________________________________________"
        )

        net_host = input(
            conf.colored(
                "\nEnter your address and range (i.e. 192.168.0.1/24) now: ",
                "green",
                attrs=["bold"],
            ))
        net_sort = net_host.split("/", 1)
        net_sort = net_sort[0]
        sn_output = input(
            conf.colored(
                f"Enter the output folder - [default: reports/Nmap/{net_sort}/]: ",
                "green",
                attrs=["bold"],
            ))
        conf.not_valid(net_scan, net_host)
        sn_output = conf.dir_output(sn_output, "reports/Nmap/", net_sort)
        conf.create_dir(sn_output)

        print(
            "______________________________________________________________________"
        )

        conf.os.system(f"sudo nmap -sn {net_host} -o {sn_output}/netscan.txt")

        print(
            "______________________________________________________________________"
        )
Пример #4
0
    def tcp_scan():
        conf.clear()

        print(
            "______________________________________________________________________"
        )

        tcp_host = input(
            conf.colored(
                "\nEnter the IP you want to Scan the ports of: ",
                "green",
                attrs=["bold"],
            ))
        tcp_output = input(
            conf.colored(
                f"Enter the output folder - [default: reports/Nmap/{tcp_host}/]: ",
                "green",
                attrs=["bold"],
            ))
        tcp_ip = conf.socket.gethostbyname(tcp_host)

        conf.not_valid(udp_scan, tcp_host)
        tcp_output = conf.dir_output(tcp_output, "reports/Nmap/", tcp_host)
        conf.create_dir(tcp_output)

        print(
            "______________________________________________________________________"
        )

        conf.os.system(f"nmap -sS {tcp_ip} -o {tcp_output}/tcpscan.txt")

        print(
            "______________________________________________________________________"
        )
Пример #5
0
    def a_scan():
        print(
            "______________________________________________________________________"
        )

        a_host = input(
            conf.colored("\nEnter the IP you want to Scan: ",
                         "green",
                         attrs=["bold"]))
        a_output = input(
            conf.colored(
                f"Enter the output folder - [default: reports/Nmap/{a_host}/]: ",
                "green",
                attrs=["bold"],
            ))
        a_ip = conf.socket.gethostbyname(a_host)

        conf.not_valid(a_scan, a_host)
        a_output = conf.dir_output(a_output, "reports/Nmap/", a_host)
        conf.create_dir(a_output)

        print(
            "______________________________________________________________________"
        )

        conf.os.system(f"sudo nmap -T4 -A {a_ip} -o {a_output}/ascan.txt")

        print(
            "______________________________________________________________________"
        )
Пример #6
0
def dirsearch_scan():
    print(
        "===================================================================")
    print(conf.colored(conf.text2art("Dirsearch Scan", "small"), "cyan"))
    print(
        "===================================================================")

    dir_host = input(conf.colored("\nEnter target: ", "green", attrs=["bold"]))
    dir_output = input(
        conf.colored(
            f"Enter the output folder - [default: reports/Dirsearch/{dir_host}/]: ",
            "green",
            attrs=["bold"],
        ))

    conf.not_valid(dirsearch_scan, dir_host)
    dir_output = conf.dir_output(dir_output, "reports/Dirsearch", dir_host)
    conf.create_dir(dir_output)

    conf.os.system(
        f"python3 {conf.home}/.local/share/dirsearch/dirsearch.py -u {dir_host} --simple-report={dir_output}/dirsearch.txt"
    )

    print(
        "______________________________________________________________________"
    )
Пример #7
0
def nikto_scan():
    print("==============================================")
    print(conf.colored(conf.text2art("Nikto Scan", "small"), "cyan"))
    print("==============================================")

    nikto_host = input(
        conf.colored("\nEnter target: ", "green", attrs=["bold"]))
    nikto_output = input(
        conf.colored(
            f"Enter the output folder - [default: reports/Nikto/{nikto_host}/]: ",
            "green",
            attrs=["bold"],
        ))

    conf.not_valid(nikto_scan, nikto_host)
    nikto_output = conf.dir_output(nikto_output, "reports/Nikto", nikto_host)

    conf.create_dir(nikto_output)

    conf.os.system(f"nikto +h {nikto_host} -output {nikto_output}/nikto.txt")

    print(
        "______________________________________________________________________"
    )
Пример #8
0
def full_scan():
    print("===========================================================")
    print(conf.colored(conf.text2art("All The Scans", "small"), "cyan"))
    print("===========================================================")

    full_host = input(
        conf.colored("\nEnter the target URL : ", "green", attrs=["bold"]))
    full_output = input(
        conf.colored(
            f"Enter the output folder - [default: reports/All/{full_host}/]: ",
            "green",
            attrs=["bold"],
        ))

    conf.not_valid(full_scan, full_host)
    full_output = conf.dir_output(full_output, "reports/All", full_host)

    conf.create_dir(full_output)

    full_ip = conf.socket.gethostbyname(full_host)

    print(
        "___________________________________________________________________________"
    )

    conf.create_dir(full_output)

    gnome_installed = True if conf.os.path.exists(
        "/usr/bin/gnome-terminal") else False

    if len(full_host) == 0:
        conf.clear()

        print("Not Valid Choice Try again")
        conf.re_open()

        conf.full_host = None
    elif gnome_installed:
        conf.os.system(
            f"gnome-terminal -- bash -c 'nmap -A {full_ip} -o \"{full_output}/nmap.txt\" && bash'"
        )
        conf.clear()

        conf.os.system(
            f"gnome-terminal -- bash -c 'python3 {conf.home}/.local/share/dirsearch/dirsearch.py -u {full_host} --simple-report=\"{full_output}/dirsearch.txt\" && bash'"
        )
        conf.clear()

        conf.os.system(
            f"gnome-terminal -- bash -c 'nikto +h {full_host} -output \"{full_output}/nikto.txt\" && bash'"
        )
        conf.clear()

    else:
        conf.os.system(f"nmap -A {full_ip} -o {full_output}/nmap.txt")

        conf.os.system(
            f"python3 ~/.local/share/dirsearch/dirsearch.py -u {full_host} --simple-report='{full_output}/dirsearch.txt'"
        )

        conf.os.system(f"nikto +h {full_host} -output {full_output}/nikto.txt")