Skip to content

Commit

Permalink
Update vuln exceptions to use generally available API version
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroorone-huff committed Jan 17, 2018
1 parent b6734b6 commit 898681a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nexpose/vuln_exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ def list_vuln_exceptions(status = nil)
url_size = 500
url_page = 0

req = Nexpose::AJAX.get(self, "/api/experimental/vulnerability_exceptions?_size=#{url_size}&_page=#{url_page}")
req = Nexpose::AJAX.get(self, "/api/3/vulnerability_exceptions?size=#{url_size}&page=#{url_page}")
data = JSON.parse(req, object_class: OpenStruct)
ajax_data << data._resources

if data._links.count > 1
loop do
url_page += 1
req = Nexpose::AJAX.get(self, "/api/experimental/vulnerability_exceptions?_size=#{url_size}&_page=#{url_page}")
req = Nexpose::AJAX.get(self, "/api/3/vulnerability_exceptions?size=#{url_size}&page=#{url_page}")
data = JSON.parse(req, object_class: OpenStruct)
ajax_data << data._resources
links = data._links.select { |ll| ['self', 'last'].include?(ll.rel) }
Expand Down

0 comments on commit 898681a

Please sign in to comment.