Skip to content

Test scripts

ron190 edited this page Jul 16, 2024 · 21 revisions

Local test with 🌿Spring

Spring test scripts are running during the continuous integration on GitHub Actions. It starts the server and create API endpoints connected to the databases available.

Local test with 🐘PHP

Use the PHP test scripts to learn injection on your local PHP environment.

Install a development environment like EasyPHP or deploy a LAMP stack on 🐳Docker, then download the PHP scripts into folder www/.

Here is script sample for Normal union-based injection on a local environment:

<?php
# http://127.0.0.1/mysql/strategy/get-normal.php?id=0

$link = mysqli_connect('localhost', 'root', '', 'my_database');

$result = $link->query("SELECT col1, col2 FROM my_table where id=$_GET[id]");

while ($row = $result->fetch_array($result, MYSQLI_NUM))
    echo join(',', $row);

Previous topic: Programming jSQL, Next topic: Roadmap