Skip to content

Commit a58750f

Browse files
author
jvazquez-r7
committed
Land rapid7#2266, @wchen-r7's patch forn [SeeRM rapid7#8345] and [SeeRM rapid7#8344]
2 parents 6b15a07 + 6b8feaf commit a58750f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/auxiliary/gather/corpwatch_lookup_id.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def initialize(info = {})
3030
register_options(
3131
[
3232
OptString.new('CW_ID', [ true, "The CorpWatch ID of the company", ""]),
33-
OptString.new('YEAR', [ false, "Year to look up", ""]),
33+
OptInt.new('YEAR', [ false, "Year to look up"]),
3434
OptBool.new('GET_LOCATIONS', [ false, "Get locations for company", true]),
3535
OptBool.new('GET_NAMES', [ false, "Get all registered names ofr the company", true]),
3636
OptBool.new('GET_FILINGS', [ false, "Get all filings", false ]),
@@ -58,7 +58,7 @@ def run
5858

5959
loot = ""
6060
uri = "/"
61-
uri << (datastore['YEAR']) if datastore['YEAR'] != ""
61+
uri << (datastore['YEAR']).to_s if datastore['YEAR'].to_s != ""
6262
uri << ("/companies/" + datastore['CW_ID'])
6363

6464
res = send_request_cgi({

modules/auxiliary/gather/corpwatch_lookup_name.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(info = {})
3333
register_options(
3434
[
3535
OptString.new('COMPANY_NAME', [ true, "Search for companies with this name", ""]),
36-
OptString.new('YEAR', [ false, "Limit results to a specific year", ""]),
36+
OptInt.new('YEAR', [ false, "Limit results to a specific year"]),
3737
OptString.new('LIMIT', [ true, "Limit the number of results returned", "5"]),
3838
OptString.new('CORPWATCH_APIKEY', [ false, "Use this API key when getting the data", ""]),
3939
], self.class)
@@ -56,7 +56,7 @@ def run
5656
datastore['RPORT'] = 80
5757

5858
uri = "/"
59-
uri << (datastore['YEAR'] + "/") if datastore['YEAR'] != ""
59+
uri << (datastore['YEAR'].to_s + "/") if datastore['YEAR'].to_s != ""
6060
uri << "companies.xml"
6161

6262
res = send_request_cgi(

0 commit comments

Comments
 (0)