Sha256: 83096a74cdf2d3eb00ac2e37efa7ecf422bde49fd0c3c5f4f90abf9e5405b985

Contents?: true

Size: 547 Bytes

Versions: 3

Compression:

Stored size: 547 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}/ascan/action/scan/"
            url.query_values = {:zapapiformat=>"JSON",:url=>@target}
            RestClient::get url.normalize.to_str
        end

        def status
            JSON.parse RestClient::get("#{@base}/ascan/view/status/?zapapiformat=JSON")
        end

    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
owasp_zap-0.0.8 lib/owasp_zap/attack.rb
owasp_zap-0.0.7 lib/owasp_zap/attack.rb
owasp_zap-0.0.6 lib/owasp_zap/attack.rb