Skip to content

nkeumosoft/pen_test

Repository files navigation

penetration testing with wapiti

Run with docker compose

clone the code and run the following command

docker-compose up -d --build

access the app on your local

https://localhost:5000/admin/

Run on virtual environment

Install python virtual environment on Unix os

python3 -m venv venv

activate virtual environment

source venv/bin/activate

Install python virtual environment on windows

https://www.liquidweb.com/kb/how-to-setup-a-python-virtual-environment-on-windows-10/

Install Requirements

pip install requirements.txt

To get started, install Postgres on your local computer, if you don’t have it already. Since Heroku uses Postgres, it will be good for us to develop locally on the same database. If you don’t have Postgres installed, Postgres.app is an easy way to get up and running for Mac OS X users. Consult the download page for more info.

Once you have Postgres installed and running, create a database called wordcount_dev to use as our local development database:

CREATE DATABASE name of your database( for example: pentest_db) and exit

SQL

$ psql
# create database pentest_db;
# \q

we are going to add a DATABASE_URL variable. Run this in the terminal:

$ export DATABASE_URL="postgresql:///pentest_db"

! note that pentest_db is the name of your database that you have create

Local Migration

In order to run the migrations initialize

Shell

$ python manage.py db init

After you run the database initialization you will see a new folder called “migrations” in the project. This holds the setup necessary for Alembic to run migrations against the project. Inside of “migrations” you will see that it has a folder called “versions”, which will contain the migration scripts as they are created.

Let’s create our first migration by running the migrate command.

Shell

$ python manage.py db migrate

Now you’ll notice in your “versions” folder there is a migration file. This file is auto-generated by Alembic based on the model. You could generate (or edit) this file yourself; however, for most cases the auto-generated file will do.

Now we’ll apply the upgrades to the database using the db upgrade command:

$ python manage.py db upgrade

The database is now ready for us to use in our app:

start application

just run the manage.py file

    $ python manage.py run