Adds a utility module to close sessions
git-svn-id: file:///home/svn/framework3/trunk@13636 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
3b32e28e0f
commit
b5070f9cad
|
@ -0,0 +1,35 @@
|
|||
##
|
||||
# $Id$
|
||||
##
|
||||
|
||||
##
|
||||
# This file is part of the Metasploit Framework and may be subject to
|
||||
# redistribution and commercial restrictions. Please see the Metasploit
|
||||
# Framework web site for more information on licensing and terms of use.
|
||||
# http://metasploit.com/framework/
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'rex'
|
||||
|
||||
class Metasploit3 < Msf::Post
|
||||
|
||||
def initialize(info={})
|
||||
super( update_info( info,
|
||||
'Name' => 'Multi Generic Operating System Session Close',
|
||||
'Description' => %q{ This module closes the specified session. This can be useful as a finisher for automation tasks },
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'hdm' ],
|
||||
'Version' => '$Revision$',
|
||||
'Platform' => [ 'linux', 'windows', 'unix', 'osx' ],
|
||||
'SessionTypes' => [ 'shell', 'meterpreter' ]
|
||||
))
|
||||
end
|
||||
|
||||
def run
|
||||
print_status("Closing session #{session.inspect}...")
|
||||
session.kill
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue