Clean up msftidy warnings/errors

This commit is contained in:
Mike Rinehart 2018-03-01 16:14:15 -06:00
parent 6225ead46e
commit d812f34457
2 changed files with 9 additions and 9 deletions

View File

@ -365,6 +365,7 @@ PLATFORMS
DEPENDENCIES
factory_girl_rails
fivemat
google-protobuf (= 3.5.1)
metasploit-aggregator
metasploit-framework!
octokit

View File

@ -9,7 +9,6 @@
require 'uri'
require 'net/http'
module Msf
class Plugin::Komand < Msf::Plugin
@ -32,7 +31,7 @@ class Plugin::Komand < Msf::Plugin
#
# Returns the hash of commands supported by this dispatcher.
#
def commands
def commands
{
'send_asset' => "Send an asset to komand"
}
@ -42,24 +41,24 @@ class Plugin::Komand < Msf::Plugin
# This method handles sending assets to Komand
#
def cmd_send_asset(*args)
if args.length < 3 || args.length > 3
print_line("Invalid arguments passed, format is \'send_asset <url> <api_key> <asset>\'")
else
url_trigger = args[0]
api_key = args[1]
asset = args[2]
url = URI(url_trigger)
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["authorization"] = api_key
request.body = asset
response = http.request(request)
puts response.read_body
print(response.read_body)
end
end
end
@ -94,7 +93,7 @@ class Plugin::Komand < Msf::Plugin
end
def desc
"Integrates with the Rapid7 Komand product"
"Integrates with the Rapid7 Komand orchestration and automation"
end
end
end