if ($exists) { // Feedback for end user $html .= '<pre>User ID exists in the database.</pre>'; } else { // User wasn't found, so the page wasn't! header( $_SERVER[ 'SERVER_PROTOCOL' ] . ' 404 Not Found' );
// Feedback for end user $html .= '<pre>User ID is MISSING from the database.</pre>'; } } ?>
sql盲注的源头在这:$query = “SELECT first_name, last_name FROM users WHERE user_id = ‘$id’;” 这里会执行SELECT first_name, last_name FROM users WHERE user_id = '$id' 此时使用1’ and 1=1# 进行第一次尝试 再使用1’ and 1=2# 检查漏洞
if ($exists) { // Feedback for end user $html .= '<pre>User ID exists in the database.</pre>'; } else { // Feedback for end user $html .= '<pre>User ID is MISSING from the database.</pre>'; } }