Files
flipperzero/BadUSB/Ducky Scripts/Offensive/Demo_Password_Change.html
T
2024-01-29 16:31:02 +01:00

121 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Change</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container-wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
.container {
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 300px;
margin: 10px; /* Add some spacing between the containers */
}
h1 {
text-align: center;
color: #333;
}
label {
display: block;
margin-bottom: 10px;
color: #555;
}
input[type="password"] {
width: 94%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 3px;
padding-left: 10px;
padding-right: 10px;
}
button {
background-color: #007bff;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 3px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.message {
text-align: center;
margin-top: 10px;
}
.success {
color: #009900;
}
.error {
color: #ff0000;
}
/* Visually appealing text */
.appealing-text {
text-align: left;
font-size: 18px;
font-weight: bold;
color: #ff0000;
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="container-wrapper">
<div class="container">
<!-- Visually appealing text -->
<div class="appealing-text"></br>Imagine an unlocked computer. This computer is logged on to an online service. And this service allows for changing passwords without asking for the current one.</div>
</div>
<div class="container">
<!-- Rest of your HTML content -->
<h1>Change Password</h1>
<form onsubmit="return validateForm()">
<label for="newPassword">New Password</label>
<input type="password" id="newPassword" name="newPassword" required>
<br>
<label for="confirmPassword">Confirm Password</label>
<input type="password" id="confirmPassword" name="confirmPassword" required>
<br>
<button type="submit">Change Password</button>
</form>
<div id="message" class="message"></div>
</div>
</div>
<script>
function validateForm() {
var newPassword = document.getElementById("newPassword").value;
var confirmPassword = document.getElementById("confirmPassword").value;
var messageDiv = document.getElementById("message");
if (newPassword === confirmPassword) {
messageDiv.innerHTML = "<p class='success'>Password changed successfully!</p>";
return false; // Prevent form submission
} else {
messageDiv.innerHTML = "<p class='error'>Passwords do not match. Try again.</p>";
return false; // Prevent form submission
}
}
</script>
</body>
</html>