presentations/introduction-to-sql-injection/example
Stefan Friese 70851726f6 theme change and typos 2024-04-18 13:56:25 +00:00
..
static worked on sql injection, added example page 2024-04-12 14:21:09 +00:00
templates added some more information to the presentation, linting of code for the example implemenation 2024-04-16 13:11:51 +00:00
README.md theme change and typos 2024-04-18 13:56:25 +00:00
create_db.py worked on sql injection, added example page 2024-04-12 14:21:09 +00:00
flask_sqli.py added some more information to the presentation, linting of code for the example implemenation 2024-04-16 13:11:51 +00:00
poetry.lock worked on sql injection, added example page 2024-04-12 14:21:09 +00:00
pyproject.toml worked on sql injection, added example page 2024-04-12 14:21:09 +00:00

README.md

Example project of a website including an SQL injection

This implementation is meant to be used for training purposes. Do not use this code in production or as a blueprint for development!

Installation

Use python poetry to install dependencies in the following way.

poetry install

Dependencies can be found inside the ./pyproject.toml file.

After installation has been done, start the flask server.

Create the Database

Execute the create_db script to setup the database

python3 ./create_db.py

Run Flask

poetry run python3 ./flask_sqli.py

Now, the website is accessible at localhost:5000

Manual Installation

If you want to install the dependencies manually use a venv in the following way.

python3 -m venv venv
source venv/bin/activate
pip install flask

Run Flask After Manual Installation

Start the flask server without poetry in the following way.

source venv/bin/activate
python3 ./flask_sqli.py

Usage

First start the server, open your browser and open the website on locahost and the port displayed after starting the flask server. Using the default configuration of flask, the port is 5000.

http://localhost:5000