Skip to content

Commit 6796ffa

Browse files
committed
Set empty string as default not boolean
1 parent d60f5b8 commit 6796ffa

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

nxc/protocols/smb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,11 +1031,11 @@ def qwinsta(self):
10311031
CONNTIME="",
10321032
DISCTIME="",
10331033
)
1034-
10351034
result = [header, header2]
10361035

1036+
# Check if we need to filter for usernames
10371037
usernames = None
1038-
if self.args.qwinsta and self.args.qwinsta is not True:
1038+
if self.args.qwinsta:
10391039
arg = self.args.qwinsta
10401040
if os.path.isfile(arg):
10411041
with open(arg) as f:

nxc/protocols/smb/proto_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def proto_args(parser, parents):
5353
mapping_enum_group.add_argument("--local-groups", nargs="?", const="", metavar="GROUP", help="Enumerate local groups, if a group is specified then its members are Enumerated")
5454
mapping_enum_group.add_argument("--pass-pol", action="store_true", help="dump password policy")
5555
mapping_enum_group.add_argument("--rid-brute", nargs="?", type=int, const=4000, metavar="MAX_RID", help="Enumerate users by bruteforcing RIDs")
56-
mapping_enum_group.add_argument("--qwinsta", type=str, nargs="?", const=True, help="Enumerate user sessions. If a username is given, filter for it; if a file is given, filter for listed usernames. If no value is given, list all.")
56+
mapping_enum_group.add_argument("--qwinsta", type=str, nargs="?", const="", help="Enumerate user sessions. If a username is given, filter for it; if a file is given, filter for listed usernames. If no value is given, list all.")
5757
mapping_enum_group.add_argument("--tasklist", action="store_true", help="Enumerate running processes")
5858

5959
wmi_group = smb_parser.add_argument_group("WMI", "Options for WMI Queries")

0 commit comments

Comments
 (0)