Hallo,
ich habe eine, ziemlich einfache, Security "Software" Programmiert.
Hier der Quellcode (Ich weiß, Uralt Konsolenanwendung. Passt aber dazu. Visuell.):
Delphi-Quellcode:
program Security1Beta;
{$APPTYPE CONSOLE}
uses
Windows,
Messages,
SysUtils,
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.
Das funktioniert soweit auch ganz gut.
Nun wollte ich allerdings, damit sich das Programm nicht so einfach beenden lässt das Programm im Vollbild starten. Wie geht das?
Kann man das Programm sonst noch weiter absichern?
Das Programm ist im Anhang.