Bir güvenlik testi projesi için localhost'umda oluşturulan sahte bir web sitesinde SQL enjeksiyonu yapmaya çalışıyorum. Ama bunun yerine, SQL enjeksiyon değil neden giriş anlamak içinSQL injection doğru çalışmıyor
Herhangi bir yardım başarısız görüntüler - bu atlayacak ve ekran Girişi Doğru böylece
Ben kullanıcı adı ve şifre alanına dizeyi" OR "='
girmeye çalıştı
<?php
mysql_connect('localhost', 'root', '');
mysql_select_db('test');
if(isset($_POST['username'])&&isset($_POST['password'])){
$username =$_POST['username'];
$password = $_POST['password'];
echo $username;
echo $password;
if(!empty($username)&&!empty($password)){
$query ="SELECT id FROM users WHERE username = '$username' AND password = '$password'";
$query_run = mysql_query($query);
if(mysql_num_rows($query_run)>=1){
echo 'Login Correct';
}else{
echo 'Login Failed';
}
}
}
?>
<form action="test.php" method="POST">
Username: <input type="text" name="username">
Password: <input type="text" name="password">
<input type="submit" value="Submit">
</form>
Muhtemelen bir sihirli tırnak sorunu – user1909426