Added more pieces to the xss puzzle
This commit is contained in:
1 parent
3c8d541d05
commit
3a5093af5d
4 files changed
+129
-9
No files matched your search
@@ -0,0 +1 @@
|
||||
<script type="text/javascript">alert('De admin heeft een kijkje op deze pagina genomen');</script>
|
||||
+51
-5
@@ -1,8 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// Check if admin logged in
|
||||
if(@$_POST['email'] == 'admin@nieuws.nl' && @$_POST['password'] == 'sesame') {
|
||||
$_SESSION['admin'] = true;
|
||||
}
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Nieuws.nl</title>
|
||||
<title>NIEUWS.nl</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Paul Wagener">
|
||||
@@ -18,8 +25,16 @@
|
||||
<body>
|
||||
|
||||
<img src="/themes/images/nieuws.png" id="logo">
|
||||
<section>
|
||||
<div id="datum">Woensdag 5 maart 2014. Het laatste nieuws het eerst op NIEUWS.nl</div>
|
||||
<section id="middle">
|
||||
<div id="datum"><?php setlocale(LC_ALL, 'nl_NL'); echo strftime("%A %e %B %Y"); ?>. Het laatste nieuws het eerst op NIEUWS.nl</div>
|
||||
|
||||
<?php
|
||||
if(@$_SESSION['admin']) {
|
||||
?>
|
||||
<div class="alert alert-warning">
|
||||
Welkom terug administrator! De geheime code is: "Setec Astronomy".
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div id="category">Algemeen / Binnenland</div>
|
||||
|
||||
@@ -43,7 +58,38 @@
|
||||
<span class="smallprint">Door: ANP</span>
|
||||
</article>
|
||||
|
||||
</section>
|
||||
<div id="comments">
|
||||
<strong>Jouw reactie:</strong>
|
||||
<form method="POST" action="addcomment.php">
|
||||
<textarea name="comment"></textarea><br />
|
||||
<button type="submit">Reageer op dit bericht</button>
|
||||
</form>
|
||||
|
||||
<div class="comment">
|
||||
<div class="comment-header">
|
||||
een tijdje geleden door <span class="author">Paul Wagener</span>
|
||||
</div>
|
||||
<p>Hoera!</p>
|
||||
</div>
|
||||
|
||||
<div class="comment">
|
||||
<div class="comment-header">
|
||||
een tijdje geleden door <span class="author">Paul Wagener</span>
|
||||
</div>
|
||||
<p>Hoera!</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id="admincheck">
|
||||
Problemen met de website? Laat het de administrator weten en hij komt een kijkje nemen op deze pagina!
|
||||
<iframe name="iframe" style="display: none;"></iframe>
|
||||
<form method="POST" target="iframe" action="admincheck.php">
|
||||
<button type="btn btn-primary">Stuur een berichtje naar de admin.</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NIEUWS.nl</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Paul Wagener">
|
||||
|
||||
<link id="callCss" rel="stylesheet" href="/themes/css/bootstrap.min.css" media="screen"/>
|
||||
<link href="/themes/css/bootstrap-responsive.min.css" rel="stylesheet"/>
|
||||
<link rel="stylesheet" href="/themes/css/nieuws.css" media="screen"/>
|
||||
|
||||
<!-- De code in dit bestand is met opzet slecht en zeer onveilig opgezet.
|
||||
GEBRUIK DEZE CODE NIET als referentiemateriaal voor je eigen PHP projecten! -->
|
||||
|
||||
<style>
|
||||
input {
|
||||
margin-bottom: 5px;
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<img src="/themes/images/nieuws.png" id="logo">
|
||||
<section id="middle">
|
||||
<div id="datum"><?php setlocale(LC_ALL, 'nl_NL'); echo strftime("%A %e %B %Y"); ?>. Het laatste nieuws het eerst op NIEUWS.nl</div>
|
||||
|
||||
<form method="POST" action="index.php" class="form-signin">
|
||||
<input name="email" class="input-block-level" placeholder="E-mail adres">
|
||||
<input name="password" type="pasword" class="input-block-level" placeholder="Wachtwoord">
|
||||
|
||||
<button type="submit" class="btn btn-primary">Inloggen</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+36
-4
@@ -1,5 +1,4 @@
|
||||
body {
|
||||
font-size: 62.5%;
|
||||
font-family: Arial,helvetica,sans-serif;
|
||||
}
|
||||
|
||||
@@ -15,13 +14,14 @@ article img {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
section {
|
||||
section#middle {
|
||||
float: left;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
#datum {
|
||||
height: 30px;
|
||||
font-size: 11px;
|
||||
line-height: 28px;
|
||||
color: #05054c;
|
||||
border-top: 1px dotted black;
|
||||
@@ -34,7 +34,7 @@ section {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
color: white;
|
||||
font-size: 1.5em;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
padding-left: 5px;
|
||||
|
||||
@@ -52,6 +52,11 @@ section {
|
||||
background-image: linear-gradient(to bottom, #98C4E5 0%, #7AA2C1 100%);
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 60%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
article {
|
||||
background-color: #eaf0fa;
|
||||
margin-top: 5px;
|
||||
@@ -86,4 +91,31 @@ p {
|
||||
a {
|
||||
color: rgb(2, 0, 81);
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.comment {
|
||||
border: 1px solid rgb(217, 226, 240);
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.comment-header {
|
||||
background-color: rgb(217, 226, 240);
|
||||
color: rgb(71, 91, 117);
|
||||
font-size: 11px;
|
||||
padding: 2px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.comment-header .author {
|
||||
color: rgb(57, 73, 95);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.comment p {
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#admincheck {
|
||||
margin-top: 20px;
|
||||
}
|
||||
Reference in new issue
Block a user