-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[reboot] Turning OWTF into a Python package (#875)
This PR is the first of many steps to refactoring OWTF and make it installable as a Python package. While most of the changes are self-explanatory, here are a couple of notes on the work: - The new web interface was moved to its separate directory (this was done in an earlier commit). We need to deprecate the old method of rendering templates using Tornado. - Completely removed Zest, PlugnHack, WafBypasser and Proxy miner support. We need addons support in OWTF so that optional features can be easily plugged in. - Renamed configuration to conf to separate it from the other config folder. - The OWTF current install runs a post installation step in python setup.py install. The PR removes the virtualenv setup completely, since now it is the user's job to run python setup.py install in a separate virtualenv for maximum compatibility. - Added Sphinx docstrings to almost every function and module in OWTF - Convert all function names to snake case. - All code is now compatible with Python3 and Python2 - Fixed tests - Refactor installation method to install everything to ~/.owtf. - Add Debian packaging scripts - Better Makefile - Create a new virtualenv, virtualenv <env> and activate the environment. - Go into OWTF directory and run python setup.py install which install OWTF as a package and starts the postsetup install script. NOTE: if the user wants to run OWTF in developer mode, they need to set an environment variable, export OWTF_DEV=1 To run OWTF, make a new folder for your target engagement, and run OWTF as python -m owtf. After this, OWTF should no longer be responsible for - running Postgresql on startup (user's job!) - virtualenv management (users should use it by default for separate projects)
- Loading branch information
Showing
1,021 changed files
with
25,089 additions
and
11,789 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*.pyc | ||
*.pyc | ||
*.pyo | ||
*.tmp | ||
.eggs/ | ||
.git/ | ||
.tox/ | ||
.ropeproject/ | ||
.cache/ | ||
build/ | ||
htmlcov/ | ||
tmp/ |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM kalilinux/kali-linux-docker | ||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get -y update && apt-get -y dist-upgrade && apt-get clean | ||
|
||
# Install certificates to ensure https links in wget work | ||
RUN apt-get -y install ca-certificates | ||
|
||
RUN apt-get -y install xvfb \ | ||
xserver-xephyr \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
gcc \ | ||
python-all-dev \ | ||
python-pip | ||
|
||
# Needed for installation of pycurl using pip in kali | ||
ENV PYCURL_SSL_LIBRARY=gnutls | ||
|
||
# psycopg2, pycurl dependency | ||
RUN apt-get -y install postgresql-server-dev-all \ | ||
postgresql-client \ | ||
postgresql-client-common \ | ||
postgresql \ | ||
libcurl4-openssl-dev \ | ||
proxychains \ | ||
tor | ||
|
||
# Install optional tools (LBD, arachni, gnutls-bin, o-saft and metagoofil) | ||
RUN apt-get -y install lbd \ | ||
gnutls-bin \ | ||
arachni \ | ||
o-saft \ | ||
metagoofil | ||
|
||
|
||
# Install sudo, python, and Java for Zest functionality | ||
RUN apt-get -y install sudo git python openjdk-8-jre openjdk-8-jdk | ||
|
||
# Fix for exporting a SHELL variable in the environment | ||
ENV SHELL /bin/bash | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
recursive-include owtf/conf * | ||
recursive-include owtf/dictionaries * | ||
recursive-include owtf/plugins * | ||
recursive-include owtf/scripts * | ||
recursive-include owtf/tools * | ||
recursive-include owtf/webui * | ||
recursive-include owtf/interface/templates * |
Oops, something went wrong.