forked from rapid7/metasploit-framework
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathclose.rb
34 lines (28 loc) · 881 Bytes
/
close.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
##
# $Id$
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##
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