Skip to content

Commit 152958e

Browse files
fix: remove restrictions on smb and ldap port choice
1 parent eb7707a commit 152958e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

nxc/protocols/ldap/proto_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
def proto_args(parser, parents):
55
ldap_parser = parser.add_parser("ldap", help="own stuff using LDAP", parents=parents, formatter_class=DisplayDefaultsNotNone)
66
ldap_parser.add_argument("-H", "--hash", metavar="HASH", dest="hash", nargs="+", default=[], help="NTLM hash(es) or file(s) containing NTLM hashes")
7-
ldap_parser.add_argument("--port", type=int, choices={389, 636}, default=389, help="LDAP port")
7+
ldap_parser.add_argument("--port", type=int, default=389, help="LDAP port")
88
ldap_parser.add_argument("--no-smb", action="store_true", help="No smb connection")
99

1010
dgroup = ldap_parser.add_mutually_exclusive_group()

nxc/protocols/smb/proto_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def proto_args(parser, parents):
1313
dgroup.add_argument("-d", "--domain", metavar="DOMAIN", dest="domain", type=str, help="domain to authenticate to")
1414
dgroup.add_argument("--local-auth", action="store_true", help="authenticate locally to each target")
1515

16-
smb_parser.add_argument("--port", type=int, choices={445, 139}, default=445, help="SMB port")
16+
smb_parser.add_argument("--port", type=int, default=445, help="SMB port")
1717
smb_parser.add_argument("--share", metavar="SHARE", default="C$", help="specify a share")
1818
smb_parser.add_argument("--smb-server-port", default="445", help="specify a server port for SMB", type=int)
1919
smb_parser.add_argument("--gen-relay-list", metavar="OUTPUT_FILE", help="outputs all hosts that don't require SMB signing to the specified file")

0 commit comments

Comments
 (0)