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( "______________________________________________________________________" )
def main(): while conf.ans: print( "===================================================================" ) print(conf.colored(conf.text2art("WebMap", "larry3d"), "cyan")) print( conf.colored("[>]", "red", attrs=["bold"]) + conf.colored("Created by : Anteste\n", "magenta", attrs=["bold"])) print( conf.colored("[>]", "red", attrs=["bold"]) + conf.colored( f"Version : {conf.version}\n", "magenta", attrs=["bold"])) conf.ver_check() print( "===================================================================" ) print(conf.colored("\n1. Nmap Scan", "yellow", attrs=["bold"])) print(conf.colored("2. Dirsearch Scan", "yellow", attrs=["bold"])) print(conf.colored("3. Nikto Scan", "yellow", attrs=["bold"])) print(conf.colored("A. All the Scans", "yellow", attrs=["bold"])) print(conf.colored("E. Exit\n", "yellow", attrs=["bold"])) print( "===================================================================" ) conf.ans = input( conf.colored("\nWhat would you like to do? Enter your selection: ", "green")).upper() if conf.ans == "1": conf.call_def(conf.nmap_scan) elif conf.ans == "2": conf.call_def(conf.dirsearch_scan) elif conf.ans == "3": conf.call_def(conf.nikto_scan) elif conf.ans == "A": conf.call_def(conf.full_scan) elif conf.ans == "E": conf.call_def(conf.exit) else: conf.not_valid(main, conf.ans, 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( "______________________________________________________________________" )
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")
def nmap_scan(): 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( "______________________________________________________________________" ) 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( "______________________________________________________________________" ) 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( "______________________________________________________________________" ) 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( "______________________________________________________________________" ) 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( "______________________________________________________________________" ) def menu_scan(): conf.clear() conf.re_open() print("================================================") print(conf.colored(conf.text2art("Nmap Scan", "small"), "cyan")) print("================================================") print( conf.colored("\n1. Scan An IP Address For Open Ports using TCP", "yellow", attrs=["bold"])) print( conf.colored("2. Scan An IP Address For Open Ports using UDP", "yellow", attrs=["bold"])) print(conf.colored("3. Operating System Scan", "yellow", attrs=["bold"])) print( conf.colored("4. Agressive Scan For An IP Address", "yellow", attrs=["bold"])) print( conf.colored("5. Scan The Network For All Devices", "yellow", attrs=["bold"])) print(conf.colored("M. Main Menu\n", "yellow", attrs=["bold"])) print("================================================") conf.ans = input( conf.colored("\nWhat would you like to do? Enter your selection: ", "green")).upper() if conf.ans == "1": conf.call_def(tcp_scan, 0) elif conf.ans == "2": conf.call_def(udp_scan, 0) elif conf.ans == "3": conf.call_def(os_scan, 0) elif conf.ans == "4": conf.call_def(a_scan, 0) elif conf.ans == "5": conf.call_def(net_scan, 0) elif conf.ans == "M": conf.call_def(menu_scan, 0) else: conf.not_valid(nmap_scan, 0) conf.ans = None