1616
1717def gen_cli_args ():
1818 setup_debug_logging ()
19-
19+
2020 try :
2121 VERSION , COMMIT = importlib .metadata .version ("netexec" ).split ("+" )
2222 DISTANCE , COMMIT = COMMIT .split ("." )
@@ -26,28 +26,28 @@ def gen_cli_args():
2626 DISTANCE = ""
2727 CODENAME = "SmoothOperator"
2828 nxc_logger .debug (f"NXC VERSION: { VERSION } - { CODENAME } - { COMMIT } - { DISTANCE } " )
29-
29+
3030 generic_parser = argparse .ArgumentParser (add_help = False , formatter_class = DisplayDefaultsNotNone )
3131 generic_group = generic_parser .add_argument_group ("Generic" , "Generic options for nxc across protocols" )
3232 generic_group .add_argument ("--version" , action = "store_true" , help = "Display nxc version" )
3333 generic_group .add_argument ("-t" , "--threads" , type = int , dest = "threads" , default = 256 , help = "set how many concurrent threads to use" )
3434 generic_group .add_argument ("--timeout" , default = None , type = int , help = "max timeout in seconds of each thread" )
3535 generic_group .add_argument ("--jitter" , metavar = "INTERVAL" , type = str , help = "sets a random delay between each authentication" )
36-
36+
3737 output_parser = argparse .ArgumentParser (add_help = False , formatter_class = DisplayDefaultsNotNone )
3838 output_group = output_parser .add_argument_group ("Output" , "Options to set verbosity levels and control output" )
3939 output_group .add_argument ("--verbose" , action = "store_true" , help = "enable verbose output" )
4040 output_group .add_argument ("--debug" , action = "store_true" , help = "enable debug level information" )
4141 output_group .add_argument ("--no-progress" , action = "store_true" , help = "do not displaying progress bar during scan" )
4242 output_group .add_argument ("--log" , metavar = "LOG" , help = "export result into a custom file" )
43-
43+
4444 dns_parser = argparse .ArgumentParser (add_help = False , formatter_class = DisplayDefaultsNotNone )
4545 dns_group = dns_parser .add_argument_group ("DNS" )
4646 dns_group .add_argument ("-6" , dest = "force_ipv6" , action = "store_true" , help = "Enable force IPv6" )
4747 dns_group .add_argument ("--dns-server" , action = "store" , help = "Specify DNS server (default: Use hosts file & System DNS)" )
4848 dns_group .add_argument ("--dns-tcp" , action = "store_true" , help = "Use TCP instead of UDP for DNS queries" )
4949 dns_group .add_argument ("--dns-timeout" , action = "store" , type = int , default = 3 , help = "DNS query timeout in seconds" )
50-
50+
5151 parser = argparse .ArgumentParser (
5252 description = rf"""
5353 . .
@@ -107,12 +107,6 @@ def gen_cli_args():
107107 certificate_group .add_argument ("--pfx-pass" , metavar = "PFXPASS" , help = "Password of the pfx certificate" )
108108 certificate_group .add_argument ("--pem-cert" , metavar = "PEMCERT" , help = "Use certificate authentication from PEM file" )
109109 certificate_group .add_argument ("--pem-key" , metavar = "PEMKEY" , help = "Private key for the PEM format" )
110-
111- server_group = std_parser .add_argument_group ("Servers" , "Options for nxc servers" )
112- server_group .add_argument ("--server" , choices = {"http" , "https" }, default = "https" , help = "use the selected server" )
113- server_group .add_argument ("--server-host" , type = str , default = "0.0.0.0" , metavar = "HOST" , help = "IP to bind the server to" )
114- server_group .add_argument ("--server-port" , metavar = "PORT" , type = int , help = "start the server on the specified port" )
115- server_group .add_argument ("--connectback-host" , type = str , metavar = "CHOST" , help = "IP for the remote system to connect back to" )
116110
117111 p_loader = ProtocolLoader ()
118112 protocols = p_loader .get_protocols ()
0 commit comments