Support backgrounding/killing active channels in meterpreter sessions; and not just the sessions themselves.
git-svn-id: file:///home/svn/framework3/trunk@10699 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
48bcc580b8
commit
4f40459498
|
@ -104,12 +104,33 @@ class WebConsole
|
|||
|
||||
def session_detach
|
||||
if(self.console.active_session)
|
||||
#background interactive meterpreter channel
|
||||
if(self.console.active_session.channels)
|
||||
self.console.active_session.channels.each_value do |ch|
|
||||
if(ch.interacting)
|
||||
ch.detach()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
#background session
|
||||
self.console.active_session.completed = true
|
||||
self.console.active_session.detach()
|
||||
end
|
||||
end
|
||||
|
||||
def session_kill
|
||||
if(self.console.active_session)
|
||||
#close interactive meterpreter channel
|
||||
if(self.console.active_session.channels)
|
||||
self.console.active_session.channels.each_value do |ch|
|
||||
if(ch.interacting)
|
||||
ch.close()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
#kill session
|
||||
self.console.active_session.kill()
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue