1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

Fixes #489. Change this a bit to be proper syntax

git-svn-id: file:///home/svn/framework3/trunk@7422 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2009-11-09 06:16:29 +00:00
parent 55c32f8bb1
commit 3853073731

View File

@ -379,11 +379,14 @@ class Core
# Instructs the driver to stop executing.
#
def cmd_exit(*args)
if(framework.sessions.count() > 0 and
(args.length < 1 or (args[0] =~ /\-Y/i) == nil))
print_status("You have active sessions open, to exit anyway type \"exit -y\"")
return
forced = false
forced = true if (args[0] and args[0] =~ /-y/i)
if(framework.sessions.length > 0 and not forced)
print_status("You have active sessions open, to exit anyway type \"exit -y\"")
return
end
driver.stop
end