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

Function parse_args

Scripts/Developer Base/Devices Finder.py:1182–1206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1180 print(" • 80/443/8080 alone no longer cause camera-style false positives")
1181 print(" • devices are shown as live even when their exact type is still unknown")
1182 print(" • type identification now uses combined evidence: ports + banners + hostnames + vendors")
1183 print(" • deep scan is optional and adds mDNS, UPnP, SNMP, NetBIOS clues")
1184 print()
1185 input(" Press Enter to return...")
1186 continue
1187 warn("Invalid choice.")
1188
1189
1190# ─────────────────────────────────────────────
1191# ARGUMENTS
1192# ─────────────────────────────────────────────
1193def parse_args():
1194 parser = argparse.ArgumentParser(
1195 description="Devices Finder – local network device discovery without root.",
1196 epilog=(
1197 "Examples:\n"
1198 " python 'Devices Finder.py' --interactive\n"
1199 " python 'Devices Finder.py' --subnet 192.168.1.0/24\n"
1200 " python 'Devices Finder.py' --exclude-self --filter camera --deep-scan\n"
1201 " python 'Devices Finder.py' --ports 22,80,443,445,631,554,8009,9100\n"
1202 ),
1203 formatter_class=argparse.RawDescriptionHelpFormatter,
1204 )
1205 parser.add_argument("--subnet", "-s", help="Target subnet, for example 192.168.1.0/24")
1206 parser.add_argument("--ports", "-p", help="Comma-separated TCP ports to scan after discovery")
1207 parser.add_argument("--output-dir", "-o", default=DEFAULT_OUTPUT_DIR, help=f"Output directory (default: {DEFAULT_OUTPUT_DIR})")
1208 parser.add_argument("--filter", "-f", choices=["all", "camera", "printer", "router", "storage", "pc", "phone", "tv", "speaker", "game_console", "iot", "vm", "unknown"], default="all", help="Show only one device type")
1209 parser.add_argument("--verbose", "-v", action="store_true", help="Verbose nmap output")

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected