Skip to content

Commit 5655e5c

Browse files
committed
Replace fixed default text with argparse default string
1 parent 5197a0e commit 5655e5c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

nxc/protocols/smb/proto_args.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ def proto_args(parser, std_parser, module_parser):
99
dgroup = smb_parser.add_mutually_exclusive_group()
1010
dgroup.add_argument("-d", metavar="DOMAIN", dest="domain", type=str, help="domain to authenticate to")
1111
dgroup.add_argument("--local-auth", action="store_true", help="authenticate locally to each target")
12-
smb_parser.add_argument("--port", type=int, choices={445, 139}, default=445, help="SMB port (default: 445)")
13-
smb_parser.add_argument("--share", metavar="SHARE", default="C$", help="specify a share (default: C$)")
12+
smb_parser.add_argument("--port", type=int, choices={445, 139}, default=445, help="SMB port (default: %(default)s)")
13+
smb_parser.add_argument("--share", metavar="SHARE", default="C$", help="specify a share (default: %(default)s)")
1414
smb_parser.add_argument("--smb-server-port", default="445", help="specify a server port for SMB", type=int)
1515
smb_parser.add_argument("--gen-relay-list", metavar="OUTPUT_FILE", help="outputs all hosts that don't require SMB signing to the specified file")
16-
smb_parser.add_argument("--smb-timeout", help="SMB connection timeout, default 2 secondes", type=int, default=2)
16+
smb_parser.add_argument("--smb-timeout", help="SMB connection timeout, default %(default)s secondes", type=int, default=2)
1717
smb_parser.add_argument("--laps", dest="laps", metavar="LAPS", type=str, help="LAPS authentification", nargs="?", const="administrator")
1818
self_delegate_arg.make_required = [delegate_arg]
1919

@@ -43,9 +43,9 @@ def proto_args(parser, std_parser, module_parser):
4343
egroup.add_argument("--computers", nargs="?", const="", metavar="COMPUTER", help="enumerate computer users")
4444
egroup.add_argument("--local-groups", nargs="?", const="", metavar="GROUP", help="enumerate local groups, if a group is specified then its members are enumerated")
4545
egroup.add_argument("--pass-pol", action="store_true", help="dump password policy")
46-
egroup.add_argument("--rid-brute", nargs="?", type=int, const=4000, metavar="MAX_RID", help="enumerate users by bruteforcing RID's (default: 4000)")
46+
egroup.add_argument("--rid-brute", nargs="?", type=int, default=4000, metavar="MAX_RID", help="enumerate users by bruteforcing RID's (default: %(default)s)")
4747
egroup.add_argument("--wmi", metavar="QUERY", type=str, help="issues the specified WMI query")
48-
egroup.add_argument("--wmi-namespace", metavar="NAMESPACE", default="root\\cimv2", help="WMI Namespace (default: root\\cimv2)")
48+
egroup.add_argument("--wmi-namespace", metavar="NAMESPACE", default="root\\cimv2", help="WMI Namespace (default: %(default)s)")
4949

5050
sgroup = smb_parser.add_argument_group("Spidering", "Options for spidering shares")
5151
sgroup.add_argument("--spider", metavar="SHARE", type=str, help="share to spider")
@@ -65,9 +65,9 @@ def proto_args(parser, std_parser, module_parser):
6565

6666
cgroup = smb_parser.add_argument_group("Command Execution", "Options for executing commands")
6767
cgroup.add_argument("--exec-method", choices={"wmiexec", "mmcexec", "smbexec", "atexec"}, default=None, help="method to execute the command. Ignored if in MSSQL mode (default: wmiexec)")
68-
cgroup.add_argument("--dcom-timeout", help="DCOM connection timeout, default is 5 secondes", type=int, default=5)
69-
cgroup.add_argument("--get-output-tries", help="Number of times atexec/smbexec/mmcexec tries to get results, default is 5", type=int, default=5)
70-
cgroup.add_argument("--codec", default="utf-8", help="Set encoding used (codec) from the target's output (default: utf-8). If errors are detected, run chcp.com at the target & map the result with https://docs.python.org/3/library/codecs.html#standard-encodings and then execute again with --codec and the corresponding codec")
68+
cgroup.add_argument("--dcom-timeout", help="DCOM connection timeout, default is %(default)s secondes", type=int, default=5)
69+
cgroup.add_argument("--get-output-tries", help="Number of times atexec/smbexec/mmcexec tries to get results, default is %(default)s", type=int, default=5)
70+
cgroup.add_argument("--codec", default="utf-8", help="Set encoding used (codec) from the target's output (default: %(default)s). If errors are detected, run chcp.com at the target & map the result with https://docs.python.org/3/library/codecs.html#standard-encodings and then execute again with --codec and the corresponding codec")
7171
cgroup.add_argument("--force-ps32", action="store_true", help="force the PowerShell command to run in a 32-bit process")
7272
cgroup.add_argument("--no-output", action="store_true", help="do not retrieve command output")
7373
cegroup = cgroup.add_mutually_exclusive_group()

0 commit comments

Comments
 (0)