-
Notifications
You must be signed in to change notification settings - Fork 0
/
failure.php
57 lines (55 loc) · 1.23 KB
/
failure.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
<!DOCTYPE html>
<html>
<head>
<title>Group #5 CTF2</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<h2 id="fmsg">Failed to Login.</h2>
<h3 id="fmsg">The entered Username and Password combination was incorrect.</h3>
<table>
<tr>
<td></td>
<td>
<a href="/">Try Logging In Again</a>
</td>
</tr>
<tr>
<td></td>
<td>
<button onclick="sendEmail()">Send Reset Email to the Entered Username Email.</button>
</td>
</tr>
</table>
</center>
<script src="jquery-3.6.0.js"></script>
<script>
function sendEmail() {
const htmlParameters = window.location.search;
const params = new URLSearchParams(htmlParameters);
var username = params.get('user');
jQuery.ajax({
type: "GET",
url: 'database.php',
dataType: 'json',
data: {
functionname: 'sendEmail',
arguments: [username]
},
success: function(obj, textstatus) {
if (!('error' in obj)) {
console.log(obj);
var status = obj.result;
if (status) {
alert("Successfully sent reset email. Please check your email!");
}
} else {
console.log(obj.error);
}
}
});
}
</script>
</body>
</html>