Some error checking and fixups
parent
7c141e11c4
commit
314026ed0e
|
@ -26,7 +26,6 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
def initialize
|
def initialize
|
||||||
super(
|
super(
|
||||||
'Name' => 'WinRM Command Runner',
|
'Name' => 'WinRM Command Runner',
|
||||||
'Version' => '$Revision$',
|
|
||||||
'Description' => %q{
|
'Description' => %q{
|
||||||
This module runs arbitrary Windows commands using the WinRM Service
|
This module runs arbitrary Windows commands using the WinRM Service
|
||||||
},
|
},
|
||||||
|
@ -50,6 +49,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
streams = winrm_run_cmd(datastore['CMD'])
|
streams = winrm_run_cmd(datastore['CMD'])
|
||||||
|
return unless streams.class == Hash
|
||||||
print_error streams['stderr'] unless streams['stderr'] == ''
|
print_error streams['stderr'] unless streams['stderr'] == ''
|
||||||
print_good streams['stdout']
|
print_good streams['stdout']
|
||||||
if datastore['SAVE_OUTPUT']
|
if datastore['SAVE_OUTPUT']
|
||||||
|
|
|
@ -37,7 +37,6 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
},
|
},
|
||||||
'Author' => [ 'thelightcosine' ],
|
'Author' => [ 'thelightcosine' ],
|
||||||
'License' => MSF_LICENSE,
|
'License' => MSF_LICENSE,
|
||||||
'Version' => '$Revision$',
|
|
||||||
'Privileged' => true,
|
'Privileged' => true,
|
||||||
'DefaultOptions' =>
|
'DefaultOptions' =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue