Skip to content

Commit 549f3c6

Browse files
committed
Dont crash when tab complete threads command with typos
1 parent 5262096 commit 549f3c6

File tree

1 file changed

+1
-1
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+1
-1
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ def cmd_threads_tabs(str, words)
10251025
return @@threads_opts.fmt.keys
10261026
end
10271027

1028-
if @@threads_opts.fmt[words[1]][0] and (words.length == 2)
1028+
if words.length == 2 and (@@threads_opts.fmt[words[1]] || [false])[0]
10291029
return framework.threads.each_index.map{ |idx| idx.to_s }
10301030
end
10311031

0 commit comments

Comments
 (0)