Make XDG open module

GSoC/Meterpreter_Web_Console
Eliott Teissonniere 2018-06-14 08:33:51 +00:00
parent b5cdf448c6
commit 3c4bcf9258
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Post
include Msf::Post::Linux::System
def initialize(info={})
super( update_info( info,
'Name' => 'Linux Admin XDG open',
'Description' => %q{
This module will open any local ressource in the target system via the 'xdg-open' command.
},
'License' => MSF_LICENSE,
'Author' => ['DeveloppSoft'],
'Platform' => ['linux'],
'SessionTypes' => ['shell', 'meterpreter']
))
register_options([
OptString.new('RES', [true, 'Ressource to open, URL or file.'])
])
end
def run
print_status('Starting xdg-open...')
cmd_exec("xdg-open #{datastore['RES']} > /dev/null")
end
end