Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab doen't work, with unclear reason #54

Open
WedLauren00 opened this issue Sep 16, 2022 · 0 comments
Open

Lab doen't work, with unclear reason #54

WedLauren00 opened this issue Sep 16, 2022 · 0 comments

Comments

@WedLauren00
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant