AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

an Exe Packer

Ein Thema von micha2330 · begonnen am 5. Nov 2007 · letzter Beitrag vom 5. Nov 2007
Antwort Antwort
micha2330

Registriert seit: 3. Nov 2007
1 Beiträge
 
#1

an Exe Packer

  Alt 5. Nov 2007, 00:49
Hi every body .
i really want to create an Exe Packer , is there any help .
or could someone point me to an Open source Exe Packer developped in Delphi .
I really need your help .

many thanks

Micha
  Mit Zitat antworten Zitat
Nuclear-Ping
(Gast)

n/a Beiträge
 
#2

Re: an Exe Packer

  Alt 5. Nov 2007, 02:22
Afaik is UPX open source, but written in C++ and Asm.

There was a question here shortly containing a PEEncrypt program written in Delphi along with its source. This could also be a good study object (-> http://www.delphipraxis.net/internal...t.php?t=119110).

But dude, no offense, asking such a question automatically somehow disqualifies you from completing such a task. This subject is quite delicate and nothing for neophytes. It's like asking "I want to write an operating system in Delphi. Are there any example sources?" - hope you got what I mean.
  Mit Zitat antworten Zitat
Benutzerbild von Phoenix
Phoenix
(Moderator)
Online

Registriert seit: 25. Jun 2002
Ort: Hausach
7.611 Beiträge
 
#3

Re: an Exe Packer

  Alt 5. Nov 2007, 07:23
/me slaps Nuclear-Ping around a bit with a large trout.
You can't write an OS in Delphi. (yes, I know you know that. Simply could not resist )
Sebastian Gingter
Phoenix - 不死鳥, Microsoft MVP, Rettungshundeführer
Über mich: Sebastian Gingter @ Thinktecture Mein Blog: https://gingter.org
  Mit Zitat antworten Zitat
Nuclear-Ping
(Gast)

n/a Beiträge
 
#4

Re: an Exe Packer

  Alt 5. Nov 2007, 08:10
Yes - And so you can't write an Exe Packer in Delphi. Or at least not the unpacker.
  Mit Zitat antworten Zitat
hathor
(Gast)

n/a Beiträge
 
#5

Re: an Exe Packer

  Alt 5. Nov 2007, 11:04
http://www.petricek.net/bca_olds.tar.bz2

Delphi-Quellcode:
{this program strips any unnecessary info from exe header and add exe-filesize
info to win32 programs (need for win32 sfx to work)}

uses b_crypt;
const
 sec:array[1..3] of longint=($1f8,$220,$248);
 UPX=$21585055;
 UPX1=$30585055;
 UPX2=$31585055;
 UPX3=$32585055;
 shitty:string[255]=
 #10#0'$Info: This file is packed with the UPX executable packer [url]http://upx.tsx.org[/url] $'#10+
 #0'$Id: UPX 0.94 Copyright (C) 1996-1999 Laszlo Molnar & Markus Oberhumer $'#10+
 #0'$Id: NRV 0.61 Copyright (C) 1996-1999 Markus F.X.J. Oberhumer $'#10;
 shitty2:string[255]=
 #0'$License: NRV for UPX is distributed under special license $'#10+
 #0'UPX!';
var
 f:file;
 i,s,t:longint;
 ss:string;
begin
 ss:=shitty;
 writeln('UPX header strip v0.1 by Bilbo');
 writeln('Usage: UPXS <file.exe>');
 if paramcount<1 then halt;
 assign(f,paramstr(1));
 reset(f,1);
 Writeln('Trying DOS UPX...');
 seek(f,$55);
 blockread(f,s,4);
 if s=UPX then begin
  s:=0;
  seek(f,$55);
  blockwrite(f,s,4);
  writeln('DOS: UPX signature removed.');
  close(f);
  halt;
 end else writeln('Error: Not DOS upx exe (',hexl(s),'<>',hexl(UPX),')');
 Writeln('Trying WIN32 UPX...');
 seek(f,60);
 blockread(f,s,4);
 seek(f,s);
 blockread(f,t,4);
 if t=$00004550 then begin
  seek(f,s-4);
  t:=filesize(f);
  blockwrite(f,t,4);
  Writeln('WIN32: Exe filesize written');
  seek(f,$2c5);
  ss[0]:=shitty[0];
  blockread(f,ss[1],ord(ss[0]));
  if ss=shitty then begin
   seek(f,$2c5);
   fillchar(ss[1],ord(ss[0]),0);
   blockwrite(f,ss[1],ord(ss[0]));
   Writeln('WIN32: UPX Comment1 removed');
  end else Writeln('WIN32: UPX Comment1 not found');
  if ioresult<>0 then writeln('WIN32: IO Error.');
  seek(f,$2c5+ord(shitty[0]));
  ss[0]:=shitty2[0];
  blockread(f,ss[1],ord(ss[0]));
  if ss=shitty2 then begin
   seek(f,$2c5+ord(shitty[0]));
   fillchar(ss[1],ord(ss[0]),0);
   blockwrite(f,ss[1],ord(ss[0]));
   Writeln('WIN32: UPX Comment2 removed');
  end else Writeln('WIN32: UPX Comment2 not found');
  if ioresult<>0 then writeln('WIN32: IO Error.');
  {Section rename}
  for i:=1 to sizeof(sec) div 4 do begin
   seek(f,sec[i]);
   blockread(f,s,4);
   if (s=UPX1) or (s=UPX2) or (s=UPX3) then begin
    s:=0;
    seek(f,sec[i]);
    blockwrite(f,s,4);
    writeln('UPX section renamed (',i,').');
   end else writeln('Error: Not UPX section(',hexl(s),')');
  end;
  if ioresult<>0 then writeln('WIN32: IO Error.');
 end else writeln('Error: Not WIN32 PE executable');
 close(f);
end.
  Mit Zitat antworten Zitat
shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#6

Re: an Exe Packer

  Alt 5. Nov 2007, 16:06
It is possible to compress only the DFM-Resources but not the code itself.
This task can be done with delphi. But it isn't easy.
I've seen this sharware tool on the Delphi Additional CD-ROM.
Andreas
  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 10:46 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