Skip to content

Commit 320e65d

Browse files
committed
chapter9
1 parent d419494 commit 320e65d

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

chapter9/code/owasp_zap/active_scan.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
import time
33
from zapv2 import ZAPv2
44

5+
apiKey='<YOUR_API_KEY>'
6+
57
target = 'http://testphp.vulnweb.com/'
6-
zap = ZAPv2()
8+
zap = ZAPv2(apikey=apiKey)
79

810
print('Accessing target {}'.format(target))
911
zap.urlopen(target)

chapter9/code/owasp_zap/ajax_spider.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
target = 'http://testphp.vulnweb.com/'
55

6-
zap = ZAPv2()
6+
apiKey='<YOUR_API_KEY>'
7+
8+
zap = ZAPv2(apikey=apiKey)
79

810
print('Ajax Spider target {}'.format(target))
911
scanID = zap.ajaxSpider.scan(target)

chapter9/code/owasp_zap/basic_spider.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
import time
33
from zapv2 import ZAPv2
44

5+
apiKey='<YOUR_API_KEY>'
6+
57
target = 'http://testphp.vulnweb.com/'
6-
zap = ZAPv2()
8+
zap = ZAPv2(apikey=apiKey)
79

810
print('Spidering target {}'.format(target))
911
scanID = zap.spider.scan(target)

chapter9/code/owasp_zap/passive_scan.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
from pprint import pprint
44
from zapv2 import ZAPv2
55

6+
apiKey='<YOUR_API_KEY>'
7+
68
target = 'http://testphp.vulnweb.com/'
7-
zap = ZAPv2()
9+
zap = ZAPv2(apikey=apiKey)
810

911
print('Accessing target {}'.format(target))
1012
zap.urlopen(target)

0 commit comments

Comments
 (0)