Created
August 5, 2013 16:07
-
-
Save yeukhon/6157129 to your computer and use it in GitHub Desktop.
run ./zap.sh -dir /tmp/zap then quit, and edit config.xml under /tmp/zap/ to change mode from standard to protect or safe then restart using the same command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from zapv2 import ZAPv2 as zap | |
| import time | |
| target = "http://testfire.net" | |
| z = zap(proxies={'http': 'http://127.0.0.1:8080'}) | |
| z.urlopen(target) | |
| time.sleep(5) | |
| print 'start..' | |
| def progress(obj): | |
| while True: | |
| p = int(obj.status) | |
| if p < 100: | |
| print p | |
| time.sleep(5) | |
| else: | |
| time.sleep(3) | |
| break | |
| z.spider.scan(target) | |
| progress(z.spider) | |
| z.ascan.scan(target) | |
| progress(z.ascan) | |
| import pprint | |
| pprint.pprint(z.core.alerts(), indent=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment