Hi,
I am running the following code (portion of code):
import time
from pprint import pprint
from zapv2 import ZAPv2
# do stuff
print 'Accessing target %s' % target
# try have a unique enough session...
zap.urlopen(target)
# Give the sites tree a chance to get updated
time.sleep(2)
print 'Spidering target %s' % target
zap.spider.scan(target)
# Give the Spider a chance to start
time.sleep(2)
while (int(zap.spider.status()) < 100):
print 'Spider progress %: ' + zap.spider.status()
time.sleep(2)
......................
Getting following error:
Accessing target
https://15.154.xxx.xSpidering target
https://15.154.xxx.xTraceback (most recent call last):
File "zap6.py", line 20, in <module>
zap.spider.scan(target)
File "c:\Python27\lib\site-packages\zapv2\spider.py", line 148, in scan
return next(self.zap._request(self.zap.base + 'spider/action/scan/', params)
.itervalues())
File "c:\Python27\lib\site-packages\zapv2\__init__.py", line 141, in _request
return json.loads(self.urlopen(url + '?' + urllib.urlencode(get)))
File "c:\Python27\lib\json\__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "c:\Python27\lib\json\decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\Python27\lib\json\decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
And also able to access API.
I get same error even if I use API key.
I am using owasp....2.4.3 with API package as 2.4-0.0.7.....
Please let me know how to proceed.
Thanks in advance.
Regards