PHP code
<?php
include "sql_and_php_debug.php";
mysql_connect("localhost", "level27", "d4MSsBNSVc052Hq6L79J5g==");
mysql_select_db("level27");
?>
<h1>Shop Again</h1>
This database has many tables. You need to dump column 'flag' from table 'flag'. (man sqlmap?)
<?php
if (!isset($_GET['product_id'])) {
?>
<h2>Our products:</h2>
<?php
$res = debug_mysql_query("SELECT id, label FROM products");
while ($row = mysql_fetch_assoc($res)) {
echo "$row[id] — <a href='?product_id=$row[id]'>$row[label]</a><p/>";
}
} else {
?>
<h2>Product description</h2>
<a href='?'>« back</a><p/>
<?php
$res = debug_mysql_query("SELECT * FROM products WHERE id = '$_GET[product_id]'");
$row = mysql_fetch_assoc($res);
echo "<h3>$row[label]</h3><p/>$row[description]";
}
SQL debug
Shop Again
This database has many tables. You need to dump column 'flag' from table 'flag'. (man sqlmap?)
Product description
« back
Spoon
Aluminium spoon, made in USSR