Error while running command jobs: undefined method `ctx' for nil:NilClass when trying to kill a non-existent job.
Stack traces are ugly. Also, killing a job with a non-integer job ID defaults to killing job zero, which may or may not be expected behavior.
msf5 > jobs
Jobs
====
Id Name Payload Payload opts
-- ---- ------- ------------
0 Exploit: multi/handler solaris/x86/shell_reverse_tcp tcp://172.16.191.196:1337
msf5 > jobs -k 2
[*] Stopping the following job(s): 2
[-] Error while running command jobs: undefined method `ctx' for nil:NilClass
Call stack:
/pentest/exploit/metasploit-framework/lib/msf/ui/console/command_dispatcher/jobs.rb:213:in `block in cmd_jobs'
/pentest/exploit/metasploit-framework/lib/msf/ui/console/command_dispatcher/jobs.rb:212:in `each'
/pentest/exploit/metasploit-framework/lib/msf/ui/console/command_dispatcher/jobs.rb:212:in `cmd_jobs'
/pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:491:in `run_command'
/pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:453:in `block in run_single'
/pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:in `each'
/pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:in `run_single'
/pentest/exploit/metasploit-framework/lib/rex/ui/text/shell.rb:151:in `run'
/pentest/exploit/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/pentest/exploit/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:49:in `<main>'
msf5 > jobs -k asdf
[*] Stopping the following job(s): 0
[*] Stopping job 0
msf5 > jobs
Jobs
====
No active jobs.
msf5 >
Seems like I should have a look.
See #10665
Closed #10655 via #10665
Most helpful comment
Seems like I should have a look.