view source code

This is a discussion on view source code within the C Programming forums, part of the General Programming Boards category; okay, i have an app on my computer and i wish to see it's source code, the codes you write ...

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    13

    view source code

    okay, i have an app on my computer and i wish to see it's source code, the codes you write on a compiler. Hex editor? sorry im a noob at these things

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,052
    Quote Originally Posted by geniusisgenius View Post
    okay, i have an app on my computer and i wish to see it's source code, the codes you write on a compiler. Hex editor? sorry im a noob at these things
    You can't. Once it's compiled, the knowledge of the source code is lost.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    You can display it in assembly if you want, but I don't think this is 100% legal. Most companies try to make so-called reverse-engineering impossible to protect their programs from being cracked or copied.

    brewbuck: lol @ your sig

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    13
    oh ok thanks, so whats a hex editor??

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Quote Originally Posted by Brafil View Post
    You can display it in assembly if you want, but I don't think this is 100% legal. Most companies try to make so-called reverse-engineering impossible to protect their programs from being cracked or copied.

    brewbuck: lol @ your sig
    Whether it legal kind of depends on your location. Companies often claim it's illegal, but in most circumstances it's perfectly legal to reverse engineer it (citation needed :P). I believe that in most countries/states it's even legal to crack the code and distribute and even use it - as long as it's used for legal purposes.

  6. #6
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,548
    Quote Originally Posted by geniusisgenius View Post
    oh ok thanks, so whats a hex editor??
    Google
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  7. #7
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,052
    Quote Originally Posted by Brafil View Post
    You can display it in assembly if you want, but I don't think this is 100% legal. Most companies try to make so-called reverse-engineering impossible to protect their programs from being cracked or copied.

    brewbuck: lol @ your sig
    Reverse engineering might be in violation of an EULA but it's not a "go to prison" crime or anything like that.

    As somebody whose job involves a lot of reverse engineering, I don't worry about it. We aren't stealing secrets, we're trying to get systems to interoperate with other systems (something which is explicitly allowed by the law)
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  8. #8
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,035
    Compiling a program is like baking a cake.
    Once it's done you can't reduce it back into the flour, sugar, and butter etc that it was made from.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  9. #9
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,675
    Quote Originally Posted by iMalc View Post
    Compiling a program is like baking a cake.
    Once it's done you can't reduce it back into the flour, sugar, and butter etc that it was made from.
    Yeah, entropy's a beach ain't it?
    I used to be an adventurer like you... then I took an arrow to the knee.

  10. #10
    Third Eye Babkockdood's Avatar
    Join Date
    Apr 2010
    Posts
    352
    Quote Originally Posted by geniusisgenius View Post
    oh ok thanks, so whats a hex editor??
    A hex editor is a program that reads ASCII from files and prints the hex code and the eight bits for each byte.

  11. #11
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,052
    Quote Originally Posted by hk_mp5kpdw View Post
    Yeah, entropy's a beach ain't it?
    Interesting to think about it from that perspective. Compilation is inherently an information-losing process, since multiple source level constructs could, in theory, map to identical machine code. But if information is actually lost, then this corresponds to a decrease in entropy, not an increase. At first glance, that is. I wonder if anybody has ever approached the topic of decompilation from an info-theoretic standpoint.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  12. #12
    Making mistakes
    Join Date
    Dec 2008
    Posts
    476
    At least a fully optimized program should be very difficult to impossible to reverse-engineer.

    Well, as brewbuck said, that looks as a decrease in entropy, but as far as I know this is impossible since entropy always increases or stays constant for a while. Actually it increases in general since the platform itself increases entropy at least by using electricity.

    I fear that one day we will run out of order in the universe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to make a program that prints it's own source code???
    By chottachatri in forum C++ Programming
    Replies: 38
    Last Post: 03-28-2008, 07:06 PM
  2. DxEngine source code
    By Sang-drax in forum Game Programming
    Replies: 5
    Last Post: 06-26-2003, 05:50 PM
  3. Lines from Unix's source code have been copied into the heart of Linux????
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 05-19-2003, 03:50 PM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 03:28 AM
  5. Source Code Beautifier
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 05-05-2002, 09:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21