CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/post/multi/general/close.rb
Views: 11784
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
)
19
)
20
end
21
22
def run
23
print_status("Closing session #{session.inspect}...")
24
session.kill
25
end
26
end
27
28