remove some extra complication

master
Brent Cook 2019-02-28 15:03:04 -06:00
parent 31bf6a11ad
commit b22c49679b
1 changed files with 4 additions and 7 deletions

View File

@ -28,8 +28,7 @@ class MetasploitModule < Msf::Auxiliary
[
OptString.new('CMD', [ true, "The windows command to run", "ipconfig /all" ]),
OptString.new('USERNAME', [ true, "The username to authenticate as"]),
OptString.new('PASSWORD', [ true, "The password to authenticate with"]),
OptBool.new('SAVE_OUTPUT', [true, "Store output as loot", true])
OptString.new('PASSWORD', [ true, "The password to authenticate with"])
])
end
@ -38,12 +37,10 @@ class MetasploitModule < Msf::Auxiliary
streams = winrm_run_cmd(datastore['CMD'])
return unless streams.class == Hash
print_error streams['stderr'] unless streams['stderr'] == ''
print_good "#{peer}=> #{streams['stdout']}"
if datastore['SAVE_OUTPUT']
print_good "#{peer}: #{streams['stdout']}"
path = store_loot("winrm.cmd_results", "text/plain", ip, streams['stdout'], "winrm_cmd_results.txt", "WinRM CMD Results")
print_good "Results saved to #{path}"
end
end