AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Projekte Security Software
Thema durchsuchen
Ansicht
Themen-Optionen

Security Software

Ein Thema von blender · begonnen am 18. Jun 2008 · letzter Beitrag vom 26. Jun 2008
Antwort Antwort
Benutzerbild von lbccaleb
lbccaleb

Registriert seit: 25. Mai 2006
Ort: Rostock / Bremen
2.037 Beiträge
 
Delphi 7 Enterprise
 
#1

Re: Security Software

  Alt 24. Jun 2008, 17:50
du kannst auch ne menge units aus deinem programm verbannen, um die datei grösse zu reduzieren...
du verwendest eh keine befehle aus diesen units...

hab sie mal markiert:

Delphi-Quellcode:
program Security1Beta;

{$APPTYPE CONSOLE}

uses
  Windows,
  SysUtils; // das sind die einzigen verwendeten units, der rest ist nicht in verwendung
             // das verringert deine dateigrösse von rund 361kb auf rund 43kb
// Messages,
// Variants,
// Classes,
// Graphics,
// Controls,
// Forms,
// Dialogs,
// StdCtrls,
// shellapi;

var
  Passwort,
  compname,
  test: String;
  Wrongcount: Integer = 0;

label anfang, ende, EnterComputerName;

begin
  if DirectoryExists(test+'_Desktop') then WrongCount := 4;
anfang:
  Write('Please enter Password to access: ');
  ReadLn(Passwort);
  writeln;
  if (passwort = 'passwort1') and (wrongcount < 4) then
    begin
      writeln('Access...');
      goto ende;
    end
  else if wrongcount < 4 then
    begin
      writeln('Access denied!!! You can try one more.');
      inc(wrongcount);
    end
  else
    begin
      writeln('Access to all functions of the program will be blocked...');
      writeln('Another entering the password is no longer possible.');
      EnterComputerName:
      CreateDir(test+'_Desktop');
      writeln('Please identify yourself as the owner of this computer.');
      writeln;
      write('Please enter the computer name: ');
      ReadLn(compname);
      if compname = GetEnvironmentVariable('USERDOMAIN') then
        begin
          writeln;
          writeln('Computer name is checked...');
          writeln;
          writeln('Computer name confirmed.');
          RemoveDir(test+'_Desktop');
          wrongcount:= 0;
          writeln;
          goto anfang;
        end
      else
        begin
          writeln;
          writeln('Computer name is checked...');
          writeln;
          writeln('Wrong input.');
          writeln('Full closure is initialized...');
          writeln('Full closure in Progress...');
          CreateDir(test+'_Lokale Einstellungen');
          writeln('Full closure complete.');
          goto EnterComputerName
        end;
    end;
    writeln;
    goto anfang;
ende:
  writeln;
  write('To end the program press enter.');
  ReadLn;
end.

eine frage aber noch:
wozu soll dieses programm genau sein, und was hat das mit sicherheit zu tun??
Martin
MFG Caleb
TheSmallOne (MediaPlayer)
Die Dinge werden berechenbar, wenn man die Natur einer Sache durchschaut hat (Blade)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:50 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz