owasp_zap 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0536baa69ad5457c793282408ccf7c8948a1c815
4
- data.tar.gz: 2f53b51b051b6c902150091e5622cf7d434d6ee2
3
+ metadata.gz: e82081b66868c1f006c712852c66b9b78acda87b
4
+ data.tar.gz: cdeea6c9b1c52ec4c3524f6c7b1f1096a546d226
5
5
  SHA512:
6
- metadata.gz: 677a0e20af2976aa15a22f3012dae413ddbeabed580f1eddcd0596635494dd3da6a9a9e682b241ae89832df2d7aae10ba6595682be511de45284f5bd0baf5dbd
7
- data.tar.gz: b17f2db63579dcf64a237e41ebe2a9abb5b9906693357e2d337f6a96b7602850ef36b90d027ebe18a90ef65c2a176a2bd4c02cbe98f52c65ba56ab54b14aab91
6
+ metadata.gz: c68556cd341de88090187b32ff0af12c900c5e8142e63d9e272ee34a4d393d415fb51de575c95180cfb3f0637343fd7568ef350d3c5cfdcaa2451c2c09574fc8
7
+ data.tar.gz: cea4bb9b16fded48a587444fa755c56b46dd56d8cf0f795de5cfa7c360dc9d1fa48ae1bb90c5dfee26ab7ab1162e12ee1a1463b98d3d8bc88f5446b52c26e9b0
data/Rakefile CHANGED
@@ -14,4 +14,10 @@ namespace :test do
14
14
  end
15
15
  end
16
16
 
17
+ desc 'Increase version of a gem'
18
+ task :bump do
19
+ sh 'gem bump --no-commit'
20
+ end
21
+
22
+
17
23
  task :default=> :test
@@ -14,7 +14,7 @@ module OwaspZap
14
14
  end
15
15
 
16
16
  def status
17
- RestClient::get "#{@base}/ascan/view/status/?zapapiformat=JSON"
17
+ JSON.parse RestClient::get("#{@base}/ascan/view/status/?zapapiformat=JSON")
18
18
  end
19
19
 
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module OwaspZap
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/owasp_zap.rb CHANGED
@@ -6,6 +6,7 @@ require "cgi"
6
6
  require_relative "owasp_zap/version"
7
7
  require_relative "owasp_zap/string_extension"
8
8
  require_relative "owasp_zap/spider"
9
+ require_relative "owasp_zap/scan"
9
10
  require_relative "owasp_zap/attack"
10
11
  require_relative "owasp_zap/alert"
11
12
  require_relative "owasp_zap/auth"
@@ -30,6 +31,8 @@ module OwaspZap
30
31
  Zap::Attack.new(:base=>@base,:target=>@target).status
31
32
  when :spider
32
33
  Zap::Spider.new(:base=>@base,:target=>@target).status
34
+ when :scan
35
+ Zap::Scan.new(:base=>@base,:target=>@target).status
33
36
  else
34
37
  {:status=>"unknown component"}.to_json
35
38
  end
data/spec/zap_spec.rb CHANGED
@@ -126,6 +126,11 @@ describe "status_for" do
126
126
  @h = Zap::Zap.new :target=>"http://127.0.0.1"
127
127
  stub_request(:get, "http://127.0.0.1:8080/JSON/spider/view/status/?zapapiformat=JSON").to_return(:status => 200, :body => {:status=>"100"}.to_json, :headers => {})
128
128
  stub_request(:get, "http://127.0.0.1:8080/JSON/ascan/view/status/?zapapiformat=JSON").to_return(:status => 200, :body => {:status=>"100"}.to_json, :headers => {})
129
+ stub_request(:get, "http://127.0.0.1:8080/JSON/scan/view/status/?zapapiformat=JSON").to_return(:status => 200, :body => {:status=>"100"}.to_json, :headers => {})
130
+ end
131
+
132
+ it "should create a ascan" do
133
+ @h.status_for(:scan).wont_be :nil?
129
134
  end
130
135
 
131
136
  it "should create a ascan" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: owasp_zap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pereira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-02 00:00:00.000000000 Z
11
+ date: 2014-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler