Slashdot Mirror


Famous Last Words: You can't decompile a C++ program

The Great Jack Schitt writes "I've always heard that you couldn't decompile a program written with C++. This article describes how to do it. It's a bit lengthy and it doesn't seem like the author usually writes in English, but it might just work (haven't tried it, but will when I have time)."

24 of 479 comments (clear)

  1. Oop by Suffering+Bastard · · Score: 5, Funny

    it doesn't seem like the author usually writes in English

    Surely he now understands the English infinitive "to be Slashdotted".

    --
    "Molest me not with this pocket calculator stuff."
    - Deep Thought
  2. Decompile this! SlashDot Effect! by lems1 · · Score: 2, Funny

    Yeah, but they should know how to decompile the slasdot effect first... another one down. Anybody with a Mirror or Google Cache link ?

    --
    This sig can be distributed under the LGPL license
  3. Re:You can't by Morologous · · Score: 5, Funny

    Like turning hamburgers into cows...

    I'm going to use that line.
  4. Re:Intresting by Anonymous Coward · · Score: 1, Funny


    I would find both your educational background and the dictionary you're using very intresting.

  5. Re:Intresting by Morologous · · Score: 3, Funny

    *BBBBRRRRRRTTTT*

    Incorrect! Spelling Nazi may have been the answer you're looking for.

  6. Re:You can't by NewbieProgrammerMan · · Score: 5, Funny

    Heh. You're assuming that you're attempting to decompile something that had human-understandable source to start with. :)

    --
    [b.belong('us') for b in bases if b.owner() == 'you']
  7. Re:Intresting by Anonymous Coward · · Score: 2, Funny


    Its write hear in my Oxbrige Enlish Dictionairy. What are you on about?

  8. let's get back to basics by 1nv4d3r · · Score: 5, Funny

    Hell, I'd be happy if the people working for me could consistently compile their c/c++. I need a new job...

  9. Re:You can't by cperciva · · Score: 5, Funny

    We're talking about C++ here, not perl.

    Compiled C++ code can't be decompiled into anything approximating the readability of the original; compiled perl code can.

  10. Re:Intresting by handybundler · · Score: 0, Funny

    I don't know about you but I pee in the shower all the time!!! intrestingh!!!

    --


    a/s/l here. Sorry, adding domain tags to your s
  11. You're right, that is nonsense. by Anonymous Coward · · Score: 5, Funny

    I damn well know computers. I have been working with them since 1904, when the Black Man made the first computer out of a peanut. I now work for Cray research making 18 figures.

    I can scratch a superscalar CPU out of silicon with a pocket knife. I even have friends who can write major programs in binary code (yes, just 1s and 0s)... even though writing a simple "hello world" program can ammount to 92,752 bits. I fail to realize that this ability does not a good computer scientist make. Things like intelligent design and research make a CS good.

    The parent post is fluff. It's stupid, the man is flamboyant and exagerating. He clearly has no real education of computer engineering and does not recognize that any executable code can be reverse-engineered or decompiled. Especially since every langage (save interpreted languages like Java) are compiled to machine code -- specific, unambiguous, structured code. "Decompiling" this is only really a matter of translating it into your langauge of choice.

    So, Mr. Proud American, please get off your imaginary high horse. You're not fooling anyone.

  12. Mirror!!! by Anonymous Coward · · Score: 1, Funny


    Here's the text from the original article:

    1. Make a copy of the program you want to decomplie. Let's assume it's PROG.EXE. Copy it to PROGBACK.EXE.

    2. Copy PROGBACK.EXE to a DOS PC if you're not using one.

    3. Type EDIT PROGBACK.EXE from C:\ (or where ever you copied it to).

    4. Enjoy the source code! You can print it out or change it or just look at it.

    5. If you change it, use FILE SAVE.

  13. Re:This is nonsense by scottking · · Score: 2, Funny

    well, when SGI lays you off this week, you're going to have plenty of time to learn how to create programs in binary, just like your friends.

    --
    scott king
  14. Anyone want to decompile SCO? by pchown · · Score: 4, Funny
    You might decompile one file and find a comment like this at the top:

    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version
    * 2 of the License, or (at your option) any later version.
    ;-)
    1. Re:Anyone want to decompile SCO? by Anonymous Coward · · Score: 1, Funny

      Nice try but c/c++ comments are removed by the pre-processor, so you won't find this in there unless it's in a string constant. And if so, then all you have to do is run 'strings' on the binary. ;)

  15. Re:Why by Anonymous Coward · · Score: 1, Funny

    Because you're one of the "innovators" at Micro$oft!

  16. Re:You can't by Anonymous+Brave+Guy · · Score: 2, Funny
    Compiled C++ code can't be decompiled into anything approximating the readability of the original; compiled perl code can.

    Yep; compiled Perl already approximates the readability of the original pretty well anyway. :-p

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  17. I couldn't help it by Fnkmaster · · Score: 4, Funny
    Neo: Do you always look at it in binary?


    Cypher: Well you have to. The compilers work for the construct program. But there's way too much information to decode the Matrix. You get used to it. I...I don't even see the code. All I see is an array, function pointer, integer. Hey, you uh... want a drink?


    Neo: Sure.


    Cypher: You know, I know what you're thinking, because right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here. Why, oh why didn't I sell my VA Linux stock?... Good shit, huh? Cowboy Neal makes it. It's good for two things, degreasing Perl code and killing brain cells.

  18. Re:Decompiling to C++ is like... by davidstrauss · · Score: 2, Funny
    Thank you, thank you. I'm Mr. Metaphor and I'll be here all week.

    Calling yourself Mr. Metaphor is like using metaphor instead of analogy, which, in your case, is as incorrect as a cow marking its territory with cow pies and instituting an elaborate cow-tipping territory defense program.

  19. Re:Is This Really C++ by Specialist2k · · Score: 2, Funny
    And how do you compile the following statement using a C compiler?

    cout << "member 1: " << local_struct.member1 << endl;

  20. Re:You can't by Paradise+Pete · · Score: 5, Funny
    I'd prefer... Like turning shit backing into pizza.

    Clearly you haven't tried Domino's.

  21. Re:You can't by Waffle+Iron · · Score: 4, Funny
    Like turning shit backing into pizza

    Here's how:

    Flush shit down toilet -> let shit mellow at sewage plant -> strain shit residue out of bottom of sewage vat -> haul to field -> spread on grass -> grass grows -> cow eats grass -> pull cow's udder, direct milk into bucket -> ferment milk to cheese -> shred cheese -> spread on dough -> Pizza!

  22. Re:You can't by Llywelyn · · Score: 3, Funny

    This reminds me of a statement I saw on /. a long time ago:

    Python: Executable Pseudocode
    Perl: Executable line-noise

    --
    Integrate Keynote and LaTeX
  23. Re:sure you can go from asm - c++ by rsheridan6 · · Score: 4, Funny

    My girlfriend just read that over my shoulder and said "Is that a poem?"

    --
    Don't drop the soap, Tommy!