Sha256: 8dc38383b0bb55d053f17b9c3ecee968bb4010dd39ed20bcd7641826e507974a
Contents?: true
Size: 778 Bytes
Versions: 1
Compression:
Stored size: 778 Bytes
Contents
module OwaspZap class Attack def initialize(params = {}) # TODO # handle it @base = params[:base] @target = params[:target] end def start url = Addressable::URI.parse "#{@base}/JSON/ascan/action/scan/" url.query_values = {:zapapiformat=>"JSON",:url=>@target} RestClient::get url.normalize.to_str end def status ret = JSON.parse(RestClient::get("#{@base}/JSON/ascan/view/status/?zapapiformat=JSON")) if ret.has_key? "status" ret["status"].to_i else 100 # it means no running end end def running? self.status != 100 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
owasp_zap-0.0.9 | lib/owasp_zap/attack.rb |