Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/post/multi/general/close.rb
21537 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Post
7
8
def initialize(info = {})
9
super(
10
update_info(
11
info,
12
'Name' => 'Multi Generic Operating System Session Close',
13
'Description' => %q{This module closes the specified session. This can be useful as a finisher for automation tasks.},
14
'License' => MSF_LICENSE,
15
'Author' => [ 'hdm' ],
16
'Platform' => %w[linux osx unix win],
17
'SessionTypes' => [ 'shell', 'meterpreter' ],
18
'Notes' => {
19
'Stability' => [CRASH_SERVICE_DOWN],
20
'SideEffects' => [],
21
'Reliability' => []
22
}
23
)
24
)
25
end
26
27
def run
28
print_status("Closing session #{session.inspect}...")
29
session.kill
30
end
31
end
32
33