intruxxer / zaproxy

Automatically exported from code.google.com/p/zaproxy
0 stars 0 forks source link

Passive scanner is not available in the Python API #573

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm unable to use pscan.records_to_scan from the API because __init__.py does 
not create a class variable for pscan.

The following patch fixes this for me:

Index: python/api/src/zapv2/__init__.py
===================================================================
--- python/api/src/zapv2/__init__.py    (revision 2995)
+++ python/api/src/zapv2/__init__.py    (working copy)
@@ -30,6 +30,7 @@
 from context import context
 from core import core
 from params import params
+from pscan import pscan
 from search import search
 from spider import spider

@@ -70,6 +71,7 @@
         self.params = params(self)
         self.search = search(self)
         self.spider = spider(self)
+        self.pscan = pscan(self)

     def _expect_ok(self, json_data):
         """

Original issue reported on code.google.com by dave.h...@gmail.com on 26 Mar 2013 at 5:43

GoogleCodeExporter commented 9 years ago
Note that although this allows me to access pscan, calling 
pscan.records_to_scan returned a None object. This may be a separate bug, or an 
issue with my implementation of this fix. Once this is resolved I can confirm 
it and raise separately.

Original comment by dave.h...@gmail.com on 28 Mar 2013 at 11:06

GoogleCodeExporter commented 9 years ago

Original comment by psii...@gmail.com on 28 Mar 2013 at 11:31

GoogleCodeExporter commented 9 years ago
Fixed in version 0.0.4 of the api

Original comment by psii...@gmail.com on 15 Apr 2013 at 12:33