MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / run

Method run

Scripts/Network Tools/DedSec's Network.py:647–700  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

645 # --- Main Menu ---
646
647 def run(self):
648 while True:
649 options = [
650 "--- NETWORK & CONNECTIVITY ---", # 0
651 "Port Scanner (TCP)", # 1
652 "Subnet Calculator", # 2
653 "Internet Speed Test", # 3
654 "External IP Info", # 4
655 "Website Downloader (Recursive)", # 5
656 "--- OSINT & RECON ---", # 6
657 "WHOIS Lookup", # 7
658 "DNS Records", # 8
659 "Subdomain Enumeration", # 9
660 "Reverse IP Lookup", # 10
661 "Web Crawler", # 11
662 "--- WEB SECURITY ---", # 12
663 "HTTP Header Analyzer", # 13
664 "CMS Detector", # 14
665 "SQL Injection Tester", # 15
666 "Reflected XSS Scanner", # 16
667 "SSH Brute Force", # 17
668 "--- SYSTEM ---", # 18
669 "View Audit Logs", # 19
670 "Change Menu Style", # 20
671 "Exit" # 21
672 ]
673
674 sel = -1
675 if CURSES_AVAILABLE and self.menu_style == 'list':
676 sel = curses.wrapper(_draw_curses_menu, "DedSec Network Tool (Lite)", options)
677 else:
678 print(f"\n{Fore.CYAN} DEDSEC TOOLKIT - SELECT BY NUMBER{Style.RESET_ALL}")
679 for i, o in enumerate(options):
680 if o.startswith("---"): print(f"{Fore.YELLOW}{o}{Style.RESET_ALL}")
681 else: print(f"{Fore.WHITE}{i:2}. {o}{Style.RESET_ALL}")
682 try: sel = int(input(f"\nSelect option > ").strip())
683 except: sel = -1
684
685 # Mapping Selection to Functions
686 opt_map = {
687 1: self.enhanced_port_scanner, 2: self.subnet_calculator, 3: self.run_internet_speed_test,
688 4: self.get_external_ip_info, 5: self.website_downloader, 7: self.get_whois_info,
689 8: self.get_dns_records, 9: self.subdomain_enum, 10: self.reverse_ip_lookup,
690 11: self.web_crawler, 13: self.http_headers, 14: self.cms_detect,
691 15: self.sql_injector, 16: self.xss_scanner, 17: self.ssh_brute,
692 19: self.view_logs, 20: self.change_menu_style
693 }
694
695 if sel == 21: break
696 if sel in opt_map:
697 try: opt_map[sel]()
698 except KeyboardInterrupt: print("\nCancelled.")
699 elif sel != -1 and not options[sel].startswith("---"):
700 print(f"{Fore.RED}Invalid selection.{Style.RESET_ALL}"); time.sleep(1)
701
702if __name__ == "__main__":
703 if len(sys.argv) > 1 and sys.argv[1] == "--install":

Callers 3

Calls 2

printFunction · 0.85
inputFunction · 0.85

Tested by

no test coverage detected