From 66909ccbbc11cf91654b3cfad1db77f398d7a931 Mon Sep 17 00:00:00 2001 From: anderson.peterle@previdencia.gov.br Date: Thu, 10 Mar 2011 19:30:13 +0000 Subject: [PATCH] Exclusão para posterior reposição com versão 2.6-Beta-2 --- vacon/LEIAME | 4 ---- vacon/main_VACON.ddp | Bin 51 -> 0 bytes vacon/main_VACON.dfm | 219 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- vacon/main_VACON.pas | 288 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ vacon/vacon.cfg | 38 -------------------------------------- vacon/vacon.dof | 136 ---------------------------------------------------------------------------------------------------------------------------------------- vacon/vacon.dpr | 13 ------------- vacon/vacon.res | Bin 4864 -> 0 bytes 8 files changed, 0 insertions(+), 698 deletions(-) delete mode 100644 vacon/LEIAME delete mode 100755 vacon/main_VACON.ddp delete mode 100755 vacon/main_VACON.dfm delete mode 100755 vacon/main_VACON.pas delete mode 100755 vacon/vacon.cfg delete mode 100755 vacon/vacon.dof delete mode 100755 vacon/vacon.dpr delete mode 100755 vacon/vacon.res diff --git a/vacon/LEIAME b/vacon/LEIAME deleted file mode 100644 index a0d398c..0000000 --- a/vacon/LEIAME +++ /dev/null @@ -1,4 +0,0 @@ - -Esse utilitário tem o objetivo de permitir a leitura do arquivo cacic2.dat, base local do sistema, onde localizam-se as últimas coletas e configurações obtidas a partir do gerente WEB. - -Para sua utilização será necessário conhecer o valor "Chave para Leitura do Arquivo", que corresponde à chave de criptografia (o valor padrão para a Comunidade é "CacicBrasil"), e o valor "Chave Separadora", que normalmente é "=CacicIsFree=". diff --git a/vacon/main_VACON.ddp b/vacon/main_VACON.ddp deleted file mode 100755 index 4370276..0000000 Binary files a/vacon/main_VACON.ddp and /dev/null differ diff --git a/vacon/main_VACON.dfm b/vacon/main_VACON.dfm deleted file mode 100755 index ae3eaca..0000000 --- a/vacon/main_VACON.dfm +++ /dev/null @@ -1,219 +0,0 @@ -object FormVACON: TFormVACON - Left = 135 - Top = 8 - Width = 767 - Height = 652 - Caption = 'VACON - Visualizador de Arquivo de Configura'#231#227'o CACIC2.DAT' - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - FormStyle = fsStayOnTop - OldCreateOrder = False - Position = poDesktopCenter - Visible = True - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object Label1: TLabel - Left = 19 - Top = 48 - Width = 5 - Height = 13 - Font.Charset = DEFAULT_CHARSET - Font.Color = clNavy - Font.Height = -12 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object Memo1: TMemo - Left = 0 - Top = 46 - Width = 754 - Height = 549 - Lines.Strings = ( - '') - ScrollBars = ssBoth - TabOrder = 0 - end - object Bt_Sair: TButton - Left = 644 - Top = 6 - Width = 110 - Height = 35 - Caption = 'Sair' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - OnClick = Bt_SairClick - end - object Bt_Abrir_Outro: TButton - Left = 467 - Top = 6 - Width = 163 - Height = 35 - Caption = 'Abrir Outro Arquivo...' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - Visible = False - OnClick = Bt_Abrir_OutroClick - end - object GB_Chave: TGroupBox - Left = 254 - Top = 165 - Width = 264 - Height = 220 - Color = clActiveBorder - ParentColor = False - TabOrder = 3 - Visible = False - object Label2: TLabel - Left = 8 - Top = 11 - Width = 242 - Height = 16 - Caption = 'Informe a Chave para Leitura do Arquivo:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - end - object Lb_Chave_Separadora: TLabel - Left = 8 - Top = 77 - Width = 173 - Height = 16 - Caption = 'Informe a Chave Separadora' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -15 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - end - object lbDefaultChaveLeArq: TLabel - Left = 9 - Top = 51 - Width = 95 - Height = 12 - Caption = '(Default="CacicBrasil")' - Font.Charset = DEFAULT_CHARSET - Font.Color = clNavy - Font.Height = -9 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - end - object lbChaveSeparadora: TLabel - Left = 9 - Top = 118 - Width = 99 - Height = 12 - Caption = '(Default="CacicIsFree")' - Font.Charset = DEFAULT_CHARSET - Font.Color = clNavy - Font.Height = -9 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - end - object Ed_Chave: TEdit - Left = 8 - Top = 28 - Width = 249 - Height = 21 - BevelInner = bvNone - TabOrder = 0 - Text = 'CacicBrasil' - OnKeyPress = Ed_ChaveKeyPress - end - object Bt_OK_Chave: TButton - Left = 95 - Top = 165 - Width = 75 - Height = 25 - Caption = 'OK' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnClick = Bt_OK_ChaveClick - end - object Ed_Chave_Separadora: TEdit - Left = 8 - Top = 94 - Width = 249 - Height = 21 - BevelInner = bvNone - TabOrder = 1 - Text = 'CacicIsFree' - OnKeyPress = Ed_Chave_SeparadoraKeyPress - end - object chkboxExibeChaves: TCheckBox - Left = 3 - Top = 201 - Width = 97 - Height = 17 - Caption = 'Exibe Chaves' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -9 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 3 - OnClick = chkboxExibeChavesClick - end - end - object Bt_Trocar_Chave: TButton - Left = 237 - Top = 6 - Width = 227 - Height = 35 - Caption = 'Trocar Chaves de Criptografia' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - Visible = False - OnClick = PegaChave - end - object Panel1: TPanel - Left = 695 - Top = 597 - Width = 59 - Height = 17 - BevelInner = bvLowered - BevelOuter = bvLowered - Caption = 'v:2.0.0.0' - TabOrder = 5 - end - object OpenDialog1: TOpenDialog - Left = 16 - Top = 16 - end - object PJVersionInfo1: TPJVersionInfo - Left = 120 - Top = 16 - end -end diff --git a/vacon/main_VACON.pas b/vacon/main_VACON.pas deleted file mode 100755 index 2bed911..0000000 --- a/vacon/main_VACON.pas +++ /dev/null @@ -1,288 +0,0 @@ -unit main_VACON; - -interface - -uses - Windows, - SysUtils, - Forms, - DCPcrypt2, - DCPrijndael, - DCPbase64, - StdCtrls, - Controls, Classes, Dialogs, ExtCtrls, PJVersionInfo; - -type - TFormVACON = class(TForm) - Bt_Sair: TButton; - OpenDialog1: TOpenDialog; - Bt_Abrir_Outro: TButton; - Memo1: TMemo; - Label1: TLabel; - GB_Chave: TGroupBox; - Ed_Chave: TEdit; - Label2: TLabel; - Bt_OK_Chave: TButton; - Bt_Trocar_Chave: TButton; - Lb_Chave_Separadora: TLabel; - Ed_Chave_Separadora: TEdit; - lbDefaultChaveLeArq: TLabel; - lbChaveSeparadora: TLabel; - chkboxExibeChaves: TCheckBox; - Panel1: TPanel; - PJVersionInfo1: TPJVersionInfo; - procedure FormCreate(Sender: TObject); - procedure Bt_SairClick(Sender: TObject); - function DeCrypt(p_Data : String) : String; - function PadWithZeros(const str : string; size : integer) : string; - function RemoveZerosFimString(Texto : String) : String; - function Explode(Texto, Separador : String) : TStrings; - procedure Mostra(p_DatFileName: string); - procedure Bt_Abrir_OutroClick(Sender: TObject); - procedure Abrir; - procedure Bt_OK_ChaveClick(Sender: TObject); - procedure PegaChave(Sender: TObject); - procedure Ed_ChaveKeyPress(Sender: TObject; var Key: Char); - procedure Ed_Chave_SeparadoraKeyPress(Sender: TObject; var Key: Char); - procedure chkboxExibeChavesClick(Sender: TObject); - function GetVersionInfo(p_File: string):string; - function VerFmt(const MS, LS: DWORD): string; - private - { Private declarations } - public - { Public declarations } - end; - -var - FormVACON: TFormVACON; - v_CipherKey, - v_IV : string; - -// Some constants that are dependant on the cipher being used -// Assuming MCRYPT_RIJNDAEL_128 (i.e., 128bit blocksize, 256bit keysize) -const KeySize = 32; // 32 bytes = 256 bits - BlockSize = 16; // 16 bytes = 128 bits - - - -implementation - -{$R *.dfm} -// Pad a string with zeros so that it is a multiple of size -function TFormVACON.PadWithZeros(const str : string; size : integer) : string; -var - origsize, i : integer; -begin - Result := str; - origsize := Length(Result); - if ((origsize mod size) <> 0) or (origsize = 0) then - begin - SetLength(Result,((origsize div size)+1)*size); - for i := origsize+1 to Length(Result) do - Result[i] := #0; - end; -end; - -function TFormVACON.DeCrypt(p_Data : String) : String; -var - l_Cipher : TDCP_rijndael; - l_Data, l_Key, l_IV : string; -begin - Try - v_IV := 'abcdefghijklmnop'; - - // Pad Key and IV with zeros as appropriate - l_Key := PadWithZeros(v_CipherKey,KeySize); - l_IV := PadWithZeros(v_IV,BlockSize); - - // Decode the Base64 encoded string - l_Data := Base64DecodeStr(p_Data); - - // Create the cipher and initialise according to the key length - l_Cipher := TDCP_rijndael.Create(nil); - if Length(v_CipherKey) <= 16 then - l_Cipher.Init(l_Key[1],128,@l_IV[1]) - else if Length(v_CipherKey) <= 24 then - l_Cipher.Init(l_Key[1],192,@l_IV[1]) - else - l_Cipher.Init(l_Key[1],256,@l_IV[1]); - - // Decrypt the data - l_Cipher.DecryptCBC(l_Data[1],l_Data[1],Length(l_Data)); - - // Free the cipher and clear sensitive information - l_Cipher.Free; - FillChar(l_Key[1],Length(l_Key),0); - - // Return the result - Result := trim(RemoveZerosFimString(l_Data)); - Except - End; -end; - -Function TFormVACON.RemoveZerosFimString(Texto : String) : String; -var I : Integer; - strAux : string; -Begin - strAux := ''; - if (Length(trim(Texto))>0) then - For I := Length(Texto) downto 0 do - if (ord(Texto[I])<>0) Then - strAux := Texto[I] + strAux; - Result := trim(strAux); -end; - -Function TFormVACON.Explode(Texto, Separador : String) : TStrings; -var - strItem : String; - ListaAuxUTILS : TStrings; - NumCaracteres, - TamanhoSeparador, - I : Integer; -Begin - ListaAuxUTILS := TStringList.Create; - strItem := ''; - NumCaracteres := Length(Texto); - TamanhoSeparador := Length(Separador); - I := 1; - While I <= NumCaracteres Do - Begin - If (Copy(Texto,I,TamanhoSeparador) = Separador) or (I = NumCaracteres) Then - Begin - if (I = NumCaracteres) then strItem := strItem + Texto[I]; - ListaAuxUTILS.Add(trim(strItem)); - strItem := ''; - I := I + (TamanhoSeparador-1); - end - Else - strItem := strItem + Texto[I]; - - I := I + 1; - End; - Explode := ListaAuxUTILS; -end; - - -procedure TFormVACON.FormCreate(Sender: TObject); -begin - FormVACON.Visible := true; - FormVACON.Panel1.Caption := GetVersionInfo(ParamStr(0)); - Abrir; -end; - -procedure TFormVACON.Abrir; -begin - OpenDialog1 := TOpenDialog.Create(self); - OpenDialog1.InitialDir := GetCurrentDir; - OpenDialog1.Filter := 'Arquivos de Configuração (.DAT)|*.dat'; - OpenDialog1.FilterIndex := 2; - if v_CipherKey = '' then - Begin - PegaChave(nil); - End - else if OpenDialog1.Execute then Mostra(OpenDialog1.FileName); - -end; - -procedure TFormVACON.PegaChave(Sender: TObject); -begin - GB_Chave.Visible := true; - Ed_Chave.SetFocus; - chkboxExibeChavesClick(nil); -end; -function TFormVACON.VerFmt(const MS, LS: DWORD): string; - // Format the version number from the given DWORDs containing the info -begin - Result := Format('%d.%d.%d.%d', - [HiWord(MS), LoWord(MS), HiWord(LS), LoWord(LS)]) -end; - -function TFormVACON.GetVersionInfo(p_File: string):string; -var PJVersionInfo1: TPJVersionInfo; -begin - PJVersionInfo1 := TPJVersionInfo.Create(nil); - PJVersionInfo1.FileName := PChar(p_File); - Result := VerFmt(PJVersionInfo1.FixedFileInfo.dwFileVersionMS, PJVersionInfo1.FixedFileInfo.dwFileVersionLS); - PJVersionInfo1.Free; -end; - -procedure TFormVACON.Bt_SairClick(Sender: TObject); -begin - Application.Terminate; - Close; -end; - -procedure TFormVACON.Mostra(p_DatFileName: string); -var v_tstrCipherOpened: TStrings; - v_DatFile : TextFile; - v_strCipherOpened, - v_strCipherClosed : string; -begin - AssignFile(v_DatFile,p_DatFileName); - {$IOChecks off} - Reset(v_DatFile); - {$IOChecks on} - - Readln(v_DatFile,v_strCipherClosed); - while not EOF(v_DatFile) do Readln(v_DatFile,v_strCipherClosed); - - CloseFile(v_DatFile); - v_strCipherOpened:= Decrypt(v_strCipherClosed); - - if (trim(v_strCipherOpened)<>'') then - v_tstrCipherOpened := explode(v_strCipherOpened,trim(Ed_Chave_Separadora.Text)); - - if v_tstrCipherOpened.Count mod 2 = 0 then - v_tstrCipherOpened.Add(''); - - Label1.Caption := p_DatFileName; - Memo1.Visible := false; - Memo1.Text := ''; - Memo1.SetSelTextBuf(PChar(v_tstrCipherOpened.Text)); - Memo1.Visible := true; - Bt_Abrir_Outro.Visible := true; -end; - -procedure TFormVACON.Bt_Abrir_OutroClick(Sender: TObject); -begin - Abrir; -end; - -procedure TFormVACON.Bt_OK_ChaveClick(Sender: TObject); -begin - v_CipherKey := trim(Ed_Chave.Text); - if v_CipherKey <> '' then - Bt_Trocar_Chave.Visible := true; - - GB_Chave.Visible := false; - if OpenDialog1.FileName <> '' then Mostra(OpenDialog1.FileName) - else Abrir; -end; - - -procedure TFormVACON.Ed_ChaveKeyPress(Sender: TObject; var Key: Char); -begin - if Key = #13 then Ed_Chave_Separadora.SetFocus; -end; - -procedure TFormVACON.Ed_Chave_SeparadoraKeyPress(Sender: TObject; - var Key: Char); -begin - if Key = #13 then Bt_OK_ChaveClick(nil); -end; - -procedure TFormVACON.chkboxExibeChavesClick(Sender: TObject); -begin - if chkboxExibeChaves.Checked then - Begin - Ed_Chave.PasswordChar := #0; - Ed_Chave_Separadora.PasswordChar := #0; - End - else - Begin - Ed_Chave.PasswordChar := #42; - Ed_Chave_Separadora.PasswordChar := #42; - End; -end; - -end. diff --git a/vacon/vacon.cfg b/vacon/vacon.cfg deleted file mode 100755 index bce8f6c..0000000 --- a/vacon/vacon.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\arquivos de programas\borland\delphi7\Projects\Bpl" --LN"c:\arquivos de programas\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/vacon/vacon.dof b/vacon/vacon.dof deleted file mode 100755 index 3eda940..0000000 --- a/vacon/vacon.dof +++ /dev/null @@ -1,136 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOffice2k -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Language] -ActiveLang= -ProjectLang= -RootDir=C:\Arquivos de programas\Borland\Delphi7\Bin\ -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=2 -MinorVer=5 -Release=0 -Build=371 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=2.5.0.371 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=2.6 -Comments= diff --git a/vacon/vacon.dpr b/vacon/vacon.dpr deleted file mode 100755 index 4e32a81..0000000 --- a/vacon/vacon.dpr +++ /dev/null @@ -1,13 +0,0 @@ -program vacon; - -uses - Forms, - main_VACON in 'main_VACON.pas' {FormVACON}; - -{$R *.res} - -begin - Application.Initialize; - Application.CreateForm(TFormVACON, FormVACON); - Application.Run; -end. diff --git a/vacon/vacon.res b/vacon/vacon.res deleted file mode 100755 index ef3ee0d..0000000 Binary files a/vacon/vacon.res and /dev/null differ -- libgit2 0.21.2