LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-18-2003, 11:16 AM   #1
walterw
Member
 
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
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 47
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.
-NSKL
 
Old 01-18-2003, 03:31 PM   #3
lackluster
Member
 
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
Bert
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.

Bert
 
  


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:21 PM.

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