Land #5628, sessions -d removal

bug/bundler_fix
William Vu 2015-06-29 11:45:27 -05:00
commit 1bfa84b37b
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 1 additions and 25 deletions

View File

@ -40,7 +40,6 @@ class Core
"-l" => [ false, "List all active sessions" ],
"-v" => [ false, "List verbose fields" ],
"-q" => [ false, "Quiet mode" ],
"-d" => [ true, "Detach an interactive session" ],
"-k" => [ true, "Terminate sessions by session ID and/or range" ],
"-K" => [ false, "Terminate all sessions" ],
"-s" => [ true, "Run a script on the session given with -i, or all"],
@ -1679,9 +1678,6 @@ class Core
sid = val || false
when "-K"
method = 'killall'
when "-d"
method = 'detach'
sid = val || false
# Run a script on all meterpreter sessions
when "-s"
unless script
@ -1827,26 +1823,6 @@ class Core
end
end
end
when 'detach'
print_status("Detaching the following session(s): #{session_list.join(', ')}")
session_list.each do |sess_id|
session = verify_session(sess_id)
# if session is interactive, it's detachable
if session
if session.respond_to?(:response_timeout)
last_known_timeout = session.response_timeout
session.response_timeout = response_timeout
end
print_status("Detaching session #{sess_id}")
begin
session.detach
ensure
if session.respond_to?(:response_timeout) && last_known_timeout
session.response_timeout = last_known_timeout
end
end
end
end
when 'interact'
session = verify_session(sid)
if session
@ -1981,7 +1957,7 @@ class Core
end
case words[-1]
when "-i", "-k", "-d", "-u"
when "-i", "-k", "-u"
return framework.sessions.keys.map { |k| k.to_s }
when "-c"