2011-08-25 19:07:18 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2011-08-25 19:07:18 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
require 'rex'
|
|
|
|
|
2016-03-08 13:02:44 +00:00
|
|
|
class MetasploitModule < Msf::Post
|
2011-08-25 19:07:18 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
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' ],
|
2013-09-24 17:33:31 +00:00
|
|
|
'Platform' => %w{ linux osx unix win },
|
2013-08-30 21:28:54 +00:00
|
|
|
'SessionTypes' => [ 'shell', 'meterpreter' ]
|
|
|
|
))
|
|
|
|
end
|
2011-08-25 19:07:18 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def run
|
|
|
|
print_status("Closing session #{session.inspect}...")
|
|
|
|
session.kill
|
|
|
|
end
|
2011-08-25 19:07:18 +00:00
|
|
|
|
|
|
|
end
|