how to see the source code

Discussion in 'C Programming' started by newbie, Feb 17, 2006.

  1. newbie

    newbie Guest

    Anyone know how to see the source code from the .exe file?
     
    newbie, Feb 17, 2006
    #1
    1. Advertising

  2. newbie

    Grumble Guest

    newbie wrote:
    > Anyone know how to see the source code from the .exe file?


    What do you mean?
     
    Grumble, Feb 17, 2006
    #2
    1. Advertising

  3. newbie

    Markus Moll Guest

    Hi

    newbie wrote:

    > Anyone know how to see the source code from the .exe file?


    Kindly ask the person who built the executable to show you the source code.
    I'm afraid there's no other way.

    Markus
     
    Markus Moll, Feb 17, 2006
    #3
  4. newbie

    tmp123 Guest

    newbie wrote:
    > Anyone know how to see the source code from the .exe file?


    1) read the LICENSE of the program
    if still want to do it:
    2) Look for references about "reverse enginnering".
    3) read again the LICENSE, in special the part about "reverse
    enginnering".
     
    tmp123, Feb 17, 2006
    #4
  5. newbie

    Pedro Graca Guest

    newbie wrote:
    > Anyone know how to see the source code from the .exe file?


    cat?

    $ cat file.exe
    #include <stdio.h>
    int main(void) {
    puts("The answer is 42.");
    return 0;
    }
    $ gcc -xc file.exe
    $ ./a.out
    The answer is 42.


    Or did you mean to see the source code from the .out file?

    SCNR :)

    --
    If you're posting through Google read <http://cfaj.freeshell.org/google>
     
    Pedro Graca, Feb 17, 2006
    #5
  6. newbie

    Lemor Guest

    Hehe lol!
    Newbie your mind has starting working. ;-)

    The answer is reverse engeneering [in short RE]
    This the way of looking back at the codes the programmer compiled.
    Actually u cannot see the coder but the debugger [this is the program
    used in RE]
    helps u to understand what logic the programmer has used to develope
    the program.

    If u need details i can 'surely' help u out. [reply on my mail]

    So,
    Seeya'roun;-D
     
    Lemor, Feb 17, 2006
    #6
  7. "tmp123" <> writes:
    > newbie wrote:
    > > Anyone know how to see the source code from the .exe file?

    > 1) read the LICENSE of the program
    > if still want to do it:
    > 2) Look for references about "reverse enginnering".
    > 3) read again the LICENSE, in special the part about "reverse
    > enginnering".


    Whatever the license has to say about reverse engineering is
    irrelevant in most European countries, where reverse engineering is
    explicitly and irrevocably permitted by law; and all of this is
    completely off-topic in this group.

    DES
    --
    Dag-Erling Smørgrav -
     
    =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=, Feb 17, 2006
    #7
  8. newbie

    pemo Guest

    newbie wrote:
    > Anyone know how to see the source code from the .exe file?


    Load the exe into a debugger, view the disassembly.

    --
    ==============
    *Not a pedant*
    ==============
     
    pemo, Feb 17, 2006
    #8
  9. newbie

    CBFalconer Guest

    newbie wrote:
    >
    > Anyone know how to see the source code from the .exe file?


    Yes. Load the corresponding .c file into a text editor.

    Don't forget to feed hay to the cow you reconstitute from your next
    hamburger at McDonalds.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
    More details at: <http://cfaj.freeshell.org/google/>
    Also see <http://www.safalra.com/special/googlegroupsreply/>
     
    CBFalconer, Feb 17, 2006
    #9
  10. newbie

    John Bode Guest

    newbie wrote:
    > Anyone know how to see the source code from the .exe file?


    This is the programming equivalent of turning hamburger back into cows.
    There are tools available that will dissassemble the machine code and
    generate equivalent C source, but the likelihood of the generated
    source being a) readable and b) anywhere close to the original source
    is pretty low.
     
    John Bode, Feb 17, 2006
    #10
  11. newbie

    Malcolm Guest

    "newbie" <> wrote
    >.
    > Anyone know how to see the source code from the .exe file?
    >

    Most compilers strip the source from the executable, so it is impossible to
    retrieve the original source from the executable.

    Java is different - the standard specifies that the source should be
    appended to the binaries.

    There is just a slim chance that your executable has been compiled with a C
    compiler that does this. Open the file in an ASCII editor, and if this is
    the case you should be able to see the source.
     
    Malcolm, Feb 18, 2006
    #11
  12. "Malcolm" <> writes:
    > "newbie" <> wrote
    >>.
    >> Anyone know how to see the source code from the .exe file?
    >>

    > Most compilers strip the source from the executable, so it is impossible to
    > retrieve the original source from the executable.


    They don't just strip the source from the executable; the source isn't
    part of the executable to begin with.

    > Java is different - the standard specifies that the source should be
    > appended to the binaries.


    Off-topic even if true (and I don't think it is).

    > There is just a slim chance that your executable has been compiled with a C
    > compiler that does this. Open the file in an ASCII editor, and if this is
    > the case you should be able to see the source.


    I've never heard of a C compiler that does this.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Feb 18, 2006
    #12
  13. newbie

    Neil Guest

    Keith Thompson wrote:
    > "Malcolm" <> writes:
    >> "newbie" <> wrote
    >>> .
    >>> Anyone know how to see the source code from the .exe file?
    >>>

    >> Most compilers strip the source from the executable, so it is impossible to
    >> retrieve the original source from the executable.

    >
    > They don't just strip the source from the executable; the source isn't
    > part of the executable to begin with.
    >
    >> Java is different - the standard specifies that the source should be
    >> appended to the binaries.

    >
    > Off-topic even if true (and I don't think it is).
    >
    >> There is just a slim chance that your executable has been compiled with a C
    >> compiler that does this. Open the file in an ASCII editor, and if this is
    >> the case you should be able to see the source.

    >
    > I've never heard of a C compiler that does this.
    >


    Some compilers give the option of including debug info in the .exe This
    allows the debugger to find addresses. Never heard of including source
    either.
     
    Neil, Feb 19, 2006
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Flip
    Replies:
    3
    Views:
    979
    Tony Morris
    Feb 9, 2004
  2. Steve Kershaw
    Replies:
    1
    Views:
    363
    Brennan Stehling
    Sep 26, 2006
  3. joshc
    Replies:
    14
    Views:
    787
    Keith Thompson
    Jan 14, 2005
  4. femto gary

    Can I see method source code?

    femto gary, Sep 1, 2006, in forum: Ruby
    Replies:
    11
    Views:
    173
    Jean-Claude Arbaut
    Sep 3, 2006
  5. V S Rawat
    Replies:
    2
    Views:
    109
    V S Rawat
    Jul 2, 2007
Loading...

Share This Page