• Web sitemizin içeriğine ve tüm hizmetlerimize erişim sağlamak için Web sitemize kayıt olmalı ya da giriş yapmalısınız. Web sitemize üye olmak tamamen ücretsizdir.
  • Sohbetokey.com ile canlı okey oynamaya ne dersin? Hem sohbet et, hem mobil okey oyna!
  • Soru mu? Sorun mu? ''Bir Sorum Var?'' sistemimiz aktiftir. Paylaşın beraber çözüm üretelim.

Exe Şifreleme

Üyelik Tarihi
7 Ocak 2015
Konular
4,091
Mesajlar
4,274
MFC Puanı
40
Kod:
1 OpenDialog
2 Radio Button
1 Button

Kod:
procedure TForm1.Button1Click(Sender: TObject);
var
header : array [0..4] of char;
thefile : tfilestream;
Checkheader : string;
begin
OpenDialog1.Filter :='Exe Dosyası (*.exe)|*.exe';
if OpenDialog1.Execute then
  begin
     thefile :=tfilestream.Create(OpenDialog1.FileName , fmopenreadwrite);
      if radiobutton1.Checked = true then
      begin
            thefile.Seek(0,sofrombeginning);
                thefile.Read(header,sizeof(header));
               if header[0]=chr(05) then
          begin
            messagebox(form1.Handle , 'Seçdiğiniz Dosya Daha Önceden Zaten Şifrelenmiş','Uyarı',mb_iconexclamation + mb_ok);
            thefile.Free;            
            exit;
          end;
                thefile.Seek(0,sofrombeginning);
               thefile.Write(chr(05) + chr(05) + chr(05) + chr(05),4);
                thefile.Seek(-5,sofromend);
               thefile.Write(header,sizeof(header));
               thefile.Free;
               Showmessage('Dosya Kilitlendi');
             end else if radiobutton2.Checked = true then
        begin
                   thefile.Seek(-5,sofromend);
                  thefile.Read(header,sizeof(header));
                   thefile.Seek(0,sofrombeginning);
                    thefile.Write(header,sizeof(header));
                   thefile.Free;
                   showmessage('Dosya Çözüldü');
                   end;
end;
end;
 
Üst