Created
May 17, 2023 18:41
-
-
Save Zapotek/3cca1bbd478e18a41f945b2fbb630fb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pp' | |
require_relative 'rest-http-helpers' | |
# Configure the REST server to use this Agent to provide Instances. | |
request :put, 'agent/url', 'localhost:1111' | |
request :post, 'instances', { | |
url: 'http://testhtml5.vulnweb.com', | |
audit: { elements: [:links, :forms, :cookies, :ui_inputs, :ui_forms] }, | |
checks: '*' | |
} | |
instance_id = response_data['id'] | |
while sleep( 1 ) | |
request :get, "instances/#{instance_id}" | |
break if !response_data['busy'] | |
end | |
puts '*' * 88 | |
request :get, "instances/#{instance_id}/scan/report.json" | |
pp response_data | |
request :delete, "instances/#{instance_id}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment