Find the answer to your Linux question:
Results 1 to 6 of 6
Dear all, how can i view the code of a file which is of type: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    17

    binary files

    Dear all,

    how can i view the code of a file which is of type:

    ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

    Is there anything better or which gives a comprehensive output than strings ?

    cheers

  2. #2
    Trusted Penguin Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,393
    If it's an open source application, you can get hold of the source code. If you installed it with your system, the source will be available through your package manager but you might have to turn on a repository to provide source code packages.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    As Roxoff said, if the source is available, look at that. Since the executable has been stripped of symbol information, there is no way to look at the function call and variable signatures.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Apr 2009
    Posts
    17
    Thanks Rox and rubber,

    This is a shell script that has been compiled with some tool. I want to see whether the scripts could be re-engineered.

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by earlysame55 View Post
    Thanks Rox and rubber,

    This is a shell script that has been compiled with some tool. I want to see whether the scripts could be re-engineered.
    Sounds like the author(s) of the script wanted to avoid just this. There are decompiler tools that will generate "human readable" code. Just make sure you keep your Advil handy for all the headaches you'll get trying to understand what's going on... Frankly, I don't think that would allow you to "reverse engineer" the script very well, however. Better to document the behavior of the application as thoroughly as possible, and use that as a set of specifications to re-write the code in the language of your choice. Call it an exercise in white-box reverse engineering. Been there, done that...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Just Joined!
    Join Date
    Apr 2009
    Posts
    17
    Rubber thanks for the reply mate.

    We need to alter that script. It'll take ages to redo the whole thing. Any tools that U know that will decode it for me.

    cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...