diff --git a/introduction-to-sql-injection/build-presentation.sh b/introduction-to-sql-injection/build-presentation.sh new file mode 100755 index 0000000..afc539d --- /dev/null +++ b/introduction-to-sql-injection/build-presentation.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +pandoc -s --mathml -i -t revealjs sql_injection.md -V theme=simple -o presentation.html --css=./robot-lung.css + +sed -i 's|
|\n\n\n\n\n|' presentation.html diff --git a/introduction-to-sql-injection/example/README.md b/introduction-to-sql-injection/example/README.md index 1685530..de45481 100644 --- a/introduction-to-sql-injection/example/README.md +++ b/introduction-to-sql-injection/example/README.md @@ -15,7 +15,15 @@ Dependencies can be found inside the `./pyproject.toml` file. After installation has been done, start the flask server. -### Usage +### Create the Database + +Execute the [create_db](./create_db.py) script to setup the database + +```sh +python3 ./create_db.py +``` + +### Run Flask ```sh poetry run python3 ./flask_sqli.py @@ -33,7 +41,7 @@ source venv/bin/activate pip install flask ``` -### Usage after manual installation +### Run Flask After Manual Installation Start the flask server without poetry in the following way. @@ -41,3 +49,13 @@ 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 +``` diff --git a/introduction-to-sql-injection/presentation.html b/introduction-to-sql-injection/presentation.html index 71309e1..5c8526b 100644 --- a/introduction-to-sql-injection/presentation.html +++ b/introduction-to-sql-injection/presentation.html @@ -93,9 +93,15 @@ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ - + + + + + + +' UNION SELECT * FROM users WHERE user_id = 1 -- -
' UNION SELECT * FROM users WHERE user_id != 1337 -- -