Files
flipperzero/BadUSB/Ducky Scripts/Offensive/Demo_Password_Change.html
T
2024-01-21 19:54:24 +01:00

98 lines
2.9 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 {
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 300px;
}
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; /* Add equal padding on the left and right */
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;
}
</style>
</head>
<body>
<div class="container">
<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>
<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>