From 03f7ad84663e23e4eb4366ead1def109810fcc70 Mon Sep 17 00:00:00 2001 From: Mitul16 Date: Tue, 15 Jun 2021 03:35:07 +0530 Subject: [PATCH] Added missing 'return' statement When we have a session, the missing 'return' statement was allowing to index invalid sessions values --- pwncat/commands/sessions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pwncat/commands/sessions.py b/pwncat/commands/sessions.py index dbed075..88f93c5 100644 --- a/pwncat/commands/sessions.py +++ b/pwncat/commands/sessions.py @@ -73,6 +73,7 @@ class Command(CommandDefinition): if args.session_id < 0 or args.session_id >= len(manager.sessions): console.log(f"[red]error[/red]: {args.session_id}: no such session!") + return session = manager.sessions[args.session_id]