Make open works on windows

GSoC/Meterpreter_Web_Console
Eliott Teissonniere 2018-06-20 09:23:57 +00:00
parent 4c0ac00f38
commit a8e9c20d6c
1 changed files with 13 additions and 1 deletions

View File

@ -13,7 +13,7 @@ class MetasploitModule < Msf::Post
},
'License' => MSF_LICENSE,
'Author' => [ 'Eliott Teissonniere'],
'Platform' => [ 'osx', 'linux' ],
'Platform' => [ 'osx', 'linux', 'win' ],
'SessionTypes' => [ 'shell', 'meterpreter' ]
))
@ -49,12 +49,24 @@ class MetasploitModule < Msf::Post
true
end
def win_open(uri)
begin
cmd_exec("start #{uri}")
rescue EOFError
return false
end
true
end
def open(uri)
case session.platform
when 'osx'
return osx_open(uri)
when 'linux'
return linux_open(uri)
when 'windows'
return win_open(uri)
end
end