/
infection.php
80 lines (66 loc) · 1.87 KB
/
infection.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
session_start();
if(isset($_POST['ans']))
{
if(stristr($_POST['ans'],"easyone"))
{
if($_SESSION['level'] == "7")
{
include_once("db.php");
$query = "update ihax set level = 8, timestamp = '".time()."' where username = '".$_SESSION['name']."'";
$result = mysqli_query($conn,$query);
$_SESSION['level'] = "8";
}
header('Location: imagine.php');
}
else
header('Location: infection.php');
include_once("log_function.inc.php");
$ip = $_SERVER['REMOTE_ADDR'];
$text = $_SESSION['name']." ".$ip." ".$_SESSION['level']." ".$_POST['ans'];
addLog($text);
}
if(!isset($_SESSION['username']))
header('Location:login.php');
if($_SESSION['level'] < 7)
header('Location:index.php');
include_once("header.inc.php");
?>
<div id="details">
<div id="navlist">
<font style="font-family: horr2;font-size : 25px">
<ul>
<li><a href="index.php">Home</a></li>
<?php
if(!isset($_SESSION['username']))
{
?>
<li><a href="register.php">Register</a></li>
<li><a href="login.php">Login</a></li>
<?php } else {?>
<li><a href="logout.php">Logout</a></li>
<?php } ?>
<li><a href="rules.php">Rules</a></li>
<li><a href="leaderboard.php">Leaderboard</a></li>
</ul>
</font>
</div>
</div>
<div id="ques">
<script type="text/javascript" src="images/termjs.js"> </script>
<?php
?>
<table width = 500 height = 300><td align = center>
<b>
<font color="#dddddd" style="font-family: horr;font-size: 15px;">
This button goes through the key to the answer to this level, catch it to crack it </br> </br>
<CENTER> <input type = "submit" name = "ans" value = "Click Me" onclick="click2()"> </CENTER>
<form action = "<?php echo $_SERVER['PHP_SELF']?>" method = "POST" name = "frm">
<br><br>
Password : <input type = "password" name = "ans" value = ""></p> </font>
</form></b>
</td></table>
</div>
<?php
include_once("footer.inc.php");
?>