Created
May 2, 2020 18:06
-
-
Save fadyosman/2e83028d8378c76c972ffd5a54419958 to your computer and use it in GitHub Desktop.
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
import sys | |
import requests | |
if len(sys.argv) < 3: | |
print("Usage : python3 zapcrawl.py urls.txt ZAP_API_KEY") | |
exit(0) | |
urlsfile = open(sys.argv[1], 'r') | |
urls = urlsfile.readlines() | |
api_key = sys.argv[2] | |
# Strips the newline character | |
for url in urls: | |
zap_api = "http://localhost:8080/JSON/spider/action/scan/?apikey=%s&url=%s&contextName=&recurse=" % (api_key.strip(), url.strip()) | |
requests.get(url = zap_api) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment