Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Anshuman Bhartiya anshumanbh

🎯
Focusing
View GitHub Profile
View runzap.py
#!/usr/bin/env python
import os
import subprocess
import time
import urllib
from pprint import pprint
from zapv2 import ZAPv2
import sys
View zaprun.sh
#!/bin/bash
set -e
unset http_proxy
unset https_proxy
echo "Activating and entering virtualenv env"
virtualenv env
. env/bin/activate
View runzap.py
#!/usr/bin/env python
import os
import subprocess
import time
import urllib
from pprint import pprint
from zapv2 import ZAPv2
import sys
View Dockerfile
FROM owasp/zap2docker-stable
MAINTAINER Anshuman Bhartiya <anshuman.bhartiya@gmail.com>
RUN apt-get update && apt-get install -y \
python-pip
RUN pip install python-owasp-zap-v2
ADD runzap.py /zap/ZAP_2.4.0/
View zaprun.sh
#!/bin/bash
set -e
WEBCONTAINERID=$(docker run -d -P --name web training/webapp python app.py)
echo Container ID = $WEBCONTAINERID
WEBDOCKERIP=$(docker inspect $WEBCONTAINERID | grep -w IPAddress | sed 's/.*IPAddress": "//' | sed 's/",$//')
echo Webapp Docker IP = $WEBDOCKERIP
You can’t perform that action at this time.