Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 06-03-2007
b0rn b0rn is offline
Miembro
 
Registrado: ene 2007
Posts: 12
Poder: 0
b0rn Va por buen camino
Modificando exes

Hola a todos, mi duda es la siguiente......ademas no tengo ni la menor idea, como puedo hacer para editar un exe ya creado por mi.....o mejor dicho crearlo yo...generarlo....no se si me pueden proporcionar algún enlace o algo....Saludos

Última edición por b0rn fecha: 06-03-2007 a las 04:22:26.
Responder Con Cita
  #2  
Antiguo 06-03-2007
pascalutn2003 pascalutn2003 is offline
Miembro
 
Registrado: sep 2003
Ubicación: Córdoba
Posts: 36
Poder: 0
pascalutn2003 Va por buen camino
Cool Sencillito

HOLA:

Lo que estas pidiendo es facil de contestar.

Primero : por el solo hecho de estar creando un proyecto y presionar F9 para correrlo ya estas creando el EXE.

Segundo : respecto a lo de editar un EXE ya creado lo veo dificil por no decir imposible (salvo que tengas el codigo y hagas lo del primer ITEM), resulta que en la consultora donde trabajo, hemos intentado con un monton de formas y nada.
Por la red hay dando vueltas un monton de descompiladores (que vendrían a hacer exactamente lo contrario que el compilador) pero creeme que hasta ahora no hemos encontrado ninguno que realmente descompile.
¿Por qué te digo esto?, porque lo unico que descompilan (cuando menos los que hemos utilizado nosotros) es la parte de la interfaz (declaratorias y demas yerbas) dejando al resto en ASSEMBLER.

Espero te sirva de algo, de modo alguno nosotros tambien seguimos intentando, de hecho estamos creando un descompilador nosotros porque por lo visto los que hay no sirven; y si no podemos terminar de crearlo (creeme que esta dificil ) seguiremos buscando y veremos si con el tiempo aparece algo en la red.

Chau, saludos
Responder Con Cita
  #3  
Antiguo 06-03-2007
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.275
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Cita:
Empezado por pascalutn2003
Por la red hay dando vueltas un monton de descompiladores (que vendrían a hacer exactamente lo contrario que el compilador) pero creeme que hasta ahora no hemos encontrado ninguno que realmente descompile.
¿Por qué te digo esto?, porque lo unico que descompilan (cuando menos los que hemos utilizado nosotros) es la parte de la interfaz (declaratorias y demas yerbas) dejando al resto en ASSEMBLER.
Bueno, no estoy de acuerdo contigo.
Hay alguno que decompila y decompila muy bien, por cierto. En hecho de que decompilen en assembler, es porque no se puede decompilar otra cosa.
Cuando se genera un EXE en Delphi, realmente el EXE no tiene el código delphi, por lo tanto, es imposible que ningun decompilador (incluso alguno que hagáis vosotros -lo digo por si lo estáis intentando-) obtenga el código Delphi del programa. Simplemente no está.

Y digo que es imposible, porque de una sentencia en Delphi pueden salir 5, 10, 15 o 20 sentencias en assembler, pero teniendo 200 sentencias en assembler, no es posible obtener las 5, 4, 8 o 20 sentencias Delphi, porque hay muchas combinaciones posibles. Puedes intentar adivinar patrones de utilización y "suponer" qué sentencias podrían ser, pero no podrás hacerlo 100% seguro. Es como tener una frase y dividirla en palabras, para luego intentar a partir de las palabras obtener la frase original; Hay muchas combinaciones.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #4  
Antiguo 06-03-2007
b0rn b0rn is offline
Miembro
 
Registrado: ene 2007
Posts: 12
Poder: 0
b0rn Va por buen camino
Hola a todos y gracias por sus respuestas.....siento que no me exprese bien tal vez pero bueno. Mi busqueda no ha cesado y he encontrado un codigo que edita un exe en delphi ya creado aunque esta bien dificil...a ver si me puede ayudar a editarlo.....

Código:
unit Unit1; interface  uses 
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 
   Buttons, StdCtrls,ShellAPI, ExtCtrls, Mask; //Be sure to include ShellAPI type
   TForm1 = class(TForm)
   SpeedButton1: TSpeedButton; 
   Edit1: TEdit; 
   OpenDialog1: TOpenDialog;
   Label1: TLabel;
   GroupBox1: TGroupBox;
   ScrollBar1: TScrollBar;
   SpeedButton2: TSpeedButton;
   SpeedButton3: TSpeedButton;
   SpeedButton4: TSpeedButton;
   Image1: TImage;
   Label2: TLabel;
   procedure FormCreate(Sender: TObject); 
   procedure SpeedButton1Click(Sender: TObject); 
   private 
   { Private declarations } 
   public 
   { Public declarations } 
   end;  var
   Form1: TForm1; 
   ExeString: String; implementation  {$R *.DFM}
   ////////////////////////////////////////////////////////////////////////////////
   procedure Extract(A,B: String;Var C,D: String);
   Var
   E,F: Integer;
   begin
   if Pos(uppercase(A),C) > 0 then
       begin
           E := Pos(uppercase(A),C)+length(A);
           F := Pos(uppercase(B),C);
           D := Copy(C,E,F-E);
       end;
   end;
       ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
   procedure Exe2String(var A:String);
   Var
   ExeStream: TFileStream;
   MyStream: TMemoryStream;
   begin
       ExeStream:=TFileStream.Create(Application.ExeName,fmOpenRead or fmShareDenyNone);
       Try
           SetLength(A, ExeStream.Size);
           ExeStream.ReadBuffer(Pointer(A)^, ExeStream.Size);
       Finally
       ExeStream.Free;
       end;
   end;
    ////////////////////////////////////////////////////////////////////////////////   ////////////////////////////////////////////////////////////////////////////////
   procedure Delay(ms : longint);
   var
   TheTime : LongInt;
   begin
   TheTime := GetTickCount + ms;
   while GetTickCount < TheTime do
   Application.ProcessMessages;
   end;
   //////////////////////////////////////////////////////////////////////////////// 
   ///////////////////////////////////////////////////////////////////////////////
   procedure TForm1.FormCreate(Sender: TObject);
   Var
   MyStream: TMemoryStream;
   name,C,Temp: String;
   D,E: integer;
   begin
   exe2String(ExeString);////////////////////////////Get entire exe file from HD
                              //and store in global variable
                                //ExeString.    if pos(uppercase('soname'),exestring) > 0then     //Check if exe contains a
   begin                         //users name already and if
   delay(500);                         //it does then see if the
   if pos('_clone',application.exename) = 0 then     //running exe is a temporary
   begin                         //clone program.. if it is not
   name := application.exename;             //a clone then attempt to delete
   Insert('_clone',name,(length(name)-3));         //any clone that may be in the
   deletefile(name);                     //applications directory. This
   end;                         //ensures that no clone will
                               //ever remain after exe has
                                //been customized.....   ////////////////////////////////////////////////////////////////////////////////
   edit1.visible := false; ///////////////////////It has been determined that
   form1.color := $00c6aa84;                 //the running exe has already been
   form1.height := 300;                 //customized..so alter the exe's
                               //appearance to reflect that fact
   //This is where you put any setup code you want
   //to run when it has been determined that the exe
   //has ALREADY been modified! Code to check for a
   //valid usename+key,to alter the exe's appearance
   //or whatever you want to do to change the way the
   //now modified prog is to act should be done HERE!
   end;     ////////////////////////////////////////////////////////////////////////////////
   //The code below runs IF it is determined that the currently running exe is
   //a temporary clone program..... this code will delete the original exe file
   //from the HD and then save a new copy of itself to the HD with the original
   //exe name...DO NOT REMOVE THE delay(500) line! The program will fail sometimes
   //if you do! Since the currently running exe is a clone that means it already
   //has been modified and in fact is identical to the final exe that it is saving
   //to disk with the original name... as soon as the new exe is saved to disk
   //this code runs it...then immediately terminates itself .. the clone commits
   //hari kiri :-) and since every time a customized exe starts up it attempts
   //to delete it's clone from the current directory this clones remaining life
   //on disk is limited to 1/2 second......
     if pos('_CLONE',uppercase(application.exename)) <> 0 then
   begin
   delay(500);
   name := application.exename;
   Delete(name,length(name)-9,6);
   if deletefile(name) then
   begin
       MyStream := TMemoryStream.Create;
       try
           MyStream.WriteBuffer(Pointer(ExeString)^, Length(ExeString));
           MyStream.savetofile(name);
           finally
               MyStream.Free;
               ShellExecute(Handle, 'open',
                               pchar(name), nil, nil, SW_SHOWNORMAL);
               application.terminate
       end;
   end
   else showmessage(name+' not found'); //this displays if it was determined that
                       //the running exe is a clone but for some
                       //crazy reason the original exe file is
                       //not found in the current directory :-(    end;    //The code below extracts the user name string from the exe file
   //and displays it as a caption...but you could retrieve whatever
 Pos(uppercase(    //data you had stored and do whatever you want with it :-)    if'soname'),exestring) > 0 then         //Extract Name string
   begin                             //from exe file and
   Extract('soname','eoname',ExeString,Temp);             //display as the button
   SpeedButton1.Caption := 'Program is Registered to '+Temp;    //caption :-)
   end;
   end;
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
   //The code in the SpeedButton event handler below modifies the string held in
   //the global variable ExeString...this string contains the entire exe file as
   //string data...it modifies ExeString by adding data to it's end... the data is
   //held between the demarcators 'SONAME' and 'EONAME' these mark off the data
   //and make it possible to find it later and extract it from the running exe
   //After ExeString is modified it is saved to a new file in the current directory
   //with the exe's name plus '_clone' so if the exe name is myprog.exe the clone
   //that is saved will be myprog_clone.exe... as soon as the clone exe is saved
   //to disk the program runs it and then terminates itself :-)
   //The reason uppercase('soname') is used is because the program would find the
   //data 'SONAME' at the wrong point in the exe file if you did not do it this way
   //ditto for uppercase('eoname') this is an IMPORTANT POINT!    procedure TForm1.SpeedButton1Click(Sender: TObject); 
   var 
   MyStream: TMemoryStream; 
   MyFile,newname: string; 
   A,B: Integer;
   begin
   If Speedbutton1.Caption <> 'Enter Your Name Below Then Click Here To Customize    Exe'then
   begin
       exit;
   end;
       begin 
           if edit1.text = '' then 
           begin 
           showmessage('Please enter a name in the Edit Box!');
           exit; 
           end;
           MyStream := TMemoryStream.Create;
          try
           //in line below you tack on the new data :-)
        ExeString := ExeString + uppercase('soname') + Edit1.Text + uppercase('soname');          MyStream.Clear;
           MyStream.WriteBuffer(Pointer(ExeString)^, Length(ExeString));//string 2 stream          newname := application.exename;     //change name to make it a clone!
           Insert('_clone',newname,length(application.exename)-3);
   
           MyStream.savetofile(newname);//save stream to file as a temporary clone!
           finally
           MyStream.Free;
          end;          ShellExecute(Handle, 'open', //run the clone you just saved!
           pchar(newname), nil, nil, SW_SHOWNORMAL);          application.terminate; //die little proggie die! :-)
           end; end; 
   
   end.



La web donde la encontre es esta (Tiene buena info) aqui esta http://www.delphihackerspages.nl/

Un saludo y espero sus respuestas
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
dos exes de un mismo prg (recompilador).. User_baja1 Varios 2 20-06-2005 09:52:09
Modificando el "constructor Create" del Form sitrico OOP 2 01-10-2004 09:51:43
DLLs y EXEs i.larranaga C++ Builder 3 02-03-2004 16:04:04
Generar Exes Descendents Varios 13 05-12-2003 22:44:30


La franja horaria es GMT +2. Ahora son las 17:11:17.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi