Skip to content

Commit 7483a15

Browse files
committed
Only apply arg check on rdp proto so it doesn't crash on others
1 parent 33a82c5 commit 7483a15

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nxc/netexec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def main():
194194
proto_module_paths.append(modules[m]["path"])
195195
protocol_object.module_paths = proto_module_paths
196196

197-
if args.execute and args.protocol == "rdp":
197+
if args.protocol == "rdp" and args.execute:
198198
ans = input(highlight("[!] Executing remote command via RDP will disconnect the Windows session (not log off) if the targeted user is connected via RDP, do you want to continue ? [Y/n] ", "red"))
199199
if ans.lower() not in ["y", "yes", ""]:
200200
exit(1)

0 commit comments

Comments
 (0)