-
Notifications
You must be signed in to change notification settings - Fork 0
/
home_page.jsp
151 lines (149 loc) · 3.8 KB
/
home_page.jsp
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<%
String user = (String) session.getAttribute( "user" );
String username = (String) session.getAttribute( "username" );
if (null == user) {
username = "User";
}
%>
<html>
<style>
body {
paddng: 0;
margin: 0;
background-color: rgb(61,72,80);
color: white;
}
html, body {
height: 100%;
}
button.backButton {
position: absolute;
float: right;
vertical-align: middle;
border: none;
background-color: rgb(245, 110, 18);
padding: 15px 15px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 5px;
right: 1%;
top: 50%;
transform: translateY(-50%);
}
button.otherButtons {
border: none;
background-color: rgb(83, 175, 63);
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 5px;
width:100%;
}
button:hover {
opacity: 0.8;
}
div.header {
position: relative;
background-image: url("bg.jpg");
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
vertical-align: middle;
top: 0%;
height: 10%;
z-index: 3;
}
div.otherButtons {
background-color: rgb(48,55,63);
position: absolute;
left: 0%;
bottom: 0%;
width: 20%;
height: 90%;
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
z-index: 2;
}
div.content {
position: absolute;
right: 0%;
bottom: 0%;
width: 80%;
height: 90%;
z-index: 1;
}
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Security Demo</title>
</head>
<body>
<div class="header">
<div style="padding:10px">
<table width="100%">
<td width="40%">
<h1 style="padding-top: 10px">
Security Demo Website
</h1>
</td>
<td>
<h1>Welcome, <font style="color: rgb(245, 110, 18);"><%= username %></font></h1>
</td>
<td>
<button class="backButton" onclick="document.location = 'index.html'"/>Back to Index</button>
</td>
</table>
</div>
</div>
<div class="content">
<div style="padding:10px">
To do:<br>
-CAPTCHA (google? make my own?) at index<br>
-Format this section<br>
-Format blog<br>
-Create fixed blog<br>
<br>
Homepage text:<br>
Over the years, security has become a more and more important aspect of application design.<br>
<br>
During the tech industry's early stages of growth, there was a great focus on the functionality of a product.<br>
Applications were dished out left and right, but little thought was given as to how secure they were.<br>
<br>
Today, attacks on insecure code happen on a daily basis, leading to a huge need for application security.<br>
Web application security has become particularly important now that almost everything today relies on the internet.<br>
<br>
[OWASP talk]
<br>
</div>
</div>
<div class="otherButtons">
<div style="padding:10px">
<table cellpadding="5" align="center">
<tr><td>
<center><h2>Demonstrations:</h2></center>
</td></tr>
<tr><td>
<%
if (null == user) {
out.print("<button class='otherButtons' onclick=\"document.location = 'login_form.jsp';\"/>SQL Injection</button>");
}
else {
out.print("<button class='otherButtons' onclick=\"document.location='login_form.jsp'\"/>SQL Injection</button>");
out.print("<button class='otherButtons' style='background-color: red;' onclick=\"document.location = 'logout_action.jsp'\"/>Logout</button>");
}
%>
</td></tr>
<tr><td>
<button class="otherButtons" onclick="document.location = 'blog_list.jsp'"/>Cross-Site Scripting (XSS)</button>
</td></tr>
</table>
<center><button class="otherButtons" style="width: 50%" onclick="document.location = 'about.html'"/>About</button></center>
</div>
</div>
</body>
</html>