Skip to content

Instantly share code, notes, and snippets.

@Zapotek
Created May 17, 2023 18:41
Show Gist options
  • Save Zapotek/3cca1bbd478e18a41f945b2fbb630fb1 to your computer and use it in GitHub Desktop.
Save Zapotek/3cca1bbd478e18a41f945b2fbb630fb1 to your computer and use it in GitHub Desktop.
#!/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