Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-18-2003, 11:16 AM   #1
Registered: Dec 2002
Posts: 48

Rep: Reputation: 16
reverse engineering

Are there programs that let you produce source code from a compiled binary? If I wrote a program in java, c, or c++, is there a way to get the source code back?

I lost some of the source code for programs that I wrote and need to modify the programs.
Old 01-18-2003, 11:38 AM   #2
Senior Member
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
Well, the only thing i know about, from windows world, is a dissasmbler. It will give you machine, AKA Assembly, code from a compiled program, and you can hack it and modify it if you are a uber geek and know assembly.
I don't think there are any programs that can give you source code from a binary.
Old 01-18-2003, 03:31 PM   #3
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
even if they did it would be horrible. just think about it. you'd have variable names like a1 a2 b1 b2 ... they'd be horrible.
Old 01-18-2003, 04:15 PM   #4
Senior Member
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Not strictly true. Not for Java anyway.

Class files are in an intermediate form, which is why you need a virtual machine to read them. Try this:

strings AnyJavaFile.class

see the variable names are retained by the bytecode. There are many decompilers available for Java. Reverse engineering of code has never really been legal for commercial puposes (despite the DMCA - eugh!) but yeah sure, you can find out the source code at least for Java.

An easier way to find the source code for an Java applet on a website is to find the path to the class file and replace .class with .java - the original java file is usually kept right in the same directory as the class file. Free as in free beer! Hehe.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reverse Engineering for Portability dlublink Linux - Software 1 11-23-2005 01:43 PM
Reverse engineering code barrythai SUSE / openSUSE 4 09-08-2005 05:29 AM
Reverse Engineering tools hari_s_82 Linux - Newbie 0 10-13-2004 06:58 AM
linux reverse-engineering forum Hano Programming 6 07-23-2004 01:36 AM
Reverse engineering the kernel lolmc Linux - General 7 07-05-2002 11:54 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration