Files
metasploit-gs/modules/post/multi/general/close.rb
T
Tod Beardsley c547e84fa7 Prefer Ruby style for single word collections
According to the Ruby style guide, %w{} collections for arrays of single
words are preferred. They're easier to type, and if you want a quick
grep, they're easier to search.

This change converts all Payloads to this format if there is more than
one payload to choose from.

It also alphabetizes the payloads, so the order can be more predictable,
and for long sets, easier to scan with eyeballs.

See:
  https://github.com/bbatsov/ruby-style-guide#collections
2013-09-24 12:33:31 -05:00

30 lines
848 B
Ruby

##
# 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' ],
'Platform' => %w{ linux osx unix win },
'SessionTypes' => [ 'shell', 'meterpreter' ]
))
end
def run
print_status("Closing session #{session.inspect}...")
session.kill
end
end