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

Function get_input

Scripts/Network Tools/Sod.py:670–678  ·  view source on GitHub ↗
(prompt, default="", input_type=str)

Source from the content-addressed store, hash-verified

668 print()
669
670def get_input(prompt, default="", input_type=str):
671 try:
672 user_input = input(f"{Colors.CYAN}[?] {prompt} [{default}]: {Colors.RESET}").strip()
673 if not user_input:
674 return default
675 return input_type(user_input)
676 except ValueError:
677 print(f"{Colors.RED}[!] Invalid input, using default: {default}{Colors.RESET}")
678 return default
679
680def main():
681 # Auto-install dependencies on first run

Callers 1

mainFunction · 0.70

Calls 2

inputFunction · 0.85
printFunction · 0.85

Tested by

no test coverage detected