Skip to content

Lab doen't work, with unclear reason #54

@WedLauren00

Description

@WedLauren00

After setting up lab with the following steps
https://www.kalilinux.in/2021/09/how-to-setup-sql-injection-labs-kali-linux.html
Got to mention that I use an edited version of repository
(https://github.com/Rinkish/Sqli_Edited_Version)
But I hope that community of "sqli-labs" ius much wider, and asking for help from you (issue is duplicated on the Rinkish's repo). So, setup-db.php seems to be OK, after pressing "Setup/reset Database for labs" everything is normal, no errors, but when I open up First lesson (as well as second, third and I guess every lesson) and trying to insert different id parameters I see no changes.
http://127.0.0.1/sqli/Less-1/?id=1 leads to the same result as if id=2.
Welcome Dhakkan and nothing more.

I tried to inspect the responsible code

$sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1";
$result=mysqli_query($con, $sql);
$row = mysqli_fetch_array($result, MYSQLI_BOTH);

$sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1";
$result=mysqli_query($con, $sql);
$row = mysqli_fetch_array($result, MYSQLI_BOTH);

    if($row)
    {
    echo "<font size='5' color= '#99FF00'>";
    echo 'Your Login name:'. $row['username'];
    echo "<br>";
    echo 'Your Password:' .$row['password'];
    echo "</font>";
    }
    else 
    {
    echo '<font color= "#FFFF00">';
    print_r(mysqli_error($con));
    echo "</font>";  
    }

So Your Login name and Your Password doesn't present, may be $row is false, IDK.
apache2 and mysql services are started. I will be glad to hear any hints. Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions