2011-08-25 19:07:18 +00:00
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2011-08-25 19:07:18 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
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' ],
|
2012-10-23 18:33:01 +00:00
|
|
|
'Platform' => [ 'linux', 'win', 'unix', 'osx' ],
|
2011-08-25 19:07:18 +00:00
|
|
|
'SessionTypes' => [ 'shell', 'meterpreter' ]
|
|
|
|
))
|
|
|
|
end
|
|
|
|
|
|
|
|
def run
|
|
|
|
print_status("Closing session #{session.inspect}...")
|
|
|
|
session.kill
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|