Skip to content

Commit 67d8e9e

Browse files
committed
Remove const otherwise the default filter is READ,WRITE
1 parent 3549ce5 commit 67d8e9e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

nxc/protocols/smb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ def shares(self):
11981198
self.logger.debug(f"Error adding share: {error}")
11991199

12001200
if self.args.filter_shares:
1201-
self.logger.display("[ REMOVED ] Use the --shares read,write options instead.")
1201+
self.logger.display("[REMOVED] Use the --shares read,write options instead.")
12021202

12031203
self.logger.display("Enumerated shares")
12041204
self.logger.highlight(f"{'Share':<15} {'Permissions':<15} {'Remark'}")

nxc/protocols/smb/proto_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def proto_args(parser, parents):
3737
cred_gathering_group.add_argument("--user", dest="userntds", type=str, help="Dump selected user from DC")
3838

3939
mapping_enum_group = smb_parser.add_argument_group("Mapping/Enumeration", "Options for Mapping/Enumerating")
40-
mapping_enum_group.add_argument("--shares", type=str, nargs="?", const="read,write", help="Enumerate shares and access, filter on specified argument (read ; write ; read,write)")
40+
mapping_enum_group.add_argument("--shares", type=str, nargs="?", const="", help="Enumerate shares and access, filter on specified argument (read ; write ; read,write)")
4141
mapping_enum_group.add_argument("--dir", nargs="?", type=str, const="", help="List the content of a path (default path: '%(const)s')")
4242
mapping_enum_group.add_argument("--interfaces", action="store_true", help="Enumerate network interfaces")
4343
mapping_enum_group.add_argument("--no-write-check", action="store_true", help="Skip write check on shares (avoid leaving traces when missing delete permissions)")

0 commit comments

Comments
 (0)