Sha256: 68b3c3ce78231971f2e2194f28349b3ac193aebab2afcbb34897b05f9c25e70d
Contents?: true
Size: 803 Bytes
Versions: 7
Compression:
Stored size: 803 Bytes
Contents
module OwaspZap class Alert def initialize(params = {}) #handle params @base = params[:base] @target = params[:target] end # # the API has an option to give an offset (start) and the amount of alerts (count) as parameter def view(format = "JSON") raise OwaspZap::WrongFormatException,"Output format not accepted" unless ["JSON","HTML","XML"].include?(format) #http://localhost:8080/JSON/core/view/alerts/?zapapiformat=JSON&baseurl=http%3A%2F%2F192.168.1.113&start=&count= url = Addressable::URI.parse "#{@base}/#{format}/core/view/alerts/" url.query_values = {:zapapiformat=>format,:baseurl=>@target} RestClient::get url.normalize.to_str end end end
Version data entries
7 entries across 7 versions & 1 rubygems