Skip to content

Commit 53170cc

Browse files
author
“Brian
committed
msfconsole command
resolves rapid7#7330 Warns the user if they try to run msfconsole in msfconsole and does not let them do it
1 parent 27018b4 commit 53170cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/msf/ui/console/driver.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,10 @@ def stop
638638
# executable. This is only allowed if command passthru has been permitted
639639
#
640640
def unknown_command(method, line)
641+
if File.basename(method) == 'msfconsole'
642+
print_error('msfconsole cannot be run inside msfconsole');
643+
return
644+
end
641645

642646
[method, method+".exe"].each do |cmd|
643647
if command_passthru && Rex::FileUtils.find_full_path(cmd)

0 commit comments

Comments
 (0)