program XDC;
{$APPTYPE CONSOLE}
uses
SysUtils,wrstego;
begin
writeln('Stego');
writeln('Simply TC-based stego utility');
if paramstr(1)='' then
begin
writeln('________________________________');
writeln('');
writeln('Usage: Stego <p/u> FileName [d]');
writeln('________________________________');
writeln('');
writeln('A.Dark, 2008, Russia');
readln;
exit;
end;
case paramstr(1)[1] of
'u':
begin
writeln('Unpacking...');
if fileexists(paramstr(2)) then
wrstego.unpackthisfileto(paramstr(2),extractfilepath(paramstr(0)));
end;
'p':
begin
writeln('Packing...');
if extractfilepath(paramstr(2))='' then
wrstego.PackFiles(pchar(changefileext(paramstr(2),'.bmp')),nil,pchar(extractfilepath(paramstr(0))),pchar(extractfilename(paramstr(2)+#0+#0)),0)
else
if fileexists(paramstr(2)) then
wrstego.PackFiles(pchar(changefileext(paramstr(2),'.bmo')),nil,pchar(extractfilepath(paramstr(2))),pchar(extractfilename(paramstr(2)+#0+#0)),0);
if (paramstr(3)='d') then begin
FileSetReadOnly(paramstr(2),false);
DeleteFile(paramstr(2));
end;
end;
end;
end.
|