C++ disassembler? [duplicate] - g++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a program in which I've lost the C++ source code. Are there any good C++ decompilers out there?
I've already ran across Boomerang.

You can use IDA Pro by Hex-Rays. You will usually not get good C++ out of a binary unless you compiled in debugging information. Prepare to spend a lot of manual labor reversing the code.
If you didn't strip the binaries there is some hope as IDA Pro can produce C-alike code for you to work with. Usually it is very rough though, at least when I used it a couple of years ago.

information is discarded in the compiling process. Even if a decompiler could produce the logical equivalent code with classes and everything (it probably can't), the self-documenting part is gone in optimized release code. No variable names, no routine names, no class names - just addresses.

Yes, but none of them will manage to produce readable enough code to worth the effort. You will spend more time trying to read the decompiled source with assembler blocks inside, than rewriting your old app from scratch.

I haven't seen any decompilers that generate C++ code. I've seen a few experimental ones that make a reasonable attempt at generating C code, but they tended to be dependent on matching the code-generation patterns of a particular compiler (that may have changed, it's been awhile since I last looked into this). Of course any symbolic information will be gone. Google for "decompiler".

Depending on how large and how well-written the original code was, it might be worth starting again in your favourite language (which might still be C++) and learning from any mistakes made in the last version. Didn't someone once say about writing one to throw away?
n.b. Clearly if this is a huge product, then it may not be worth the time.

Related

Good obfuscator for VB.NET? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I've already tried EazFuscator and Dotfuscator but are bad! I was able to easily read the source and pay it, and frankly I'm tired of the people that I copy the software.
I ask you which obfuscator use, at least to protect all the software by beginners.
From the great Joel Coehoorn ... you can read more here
How can I protect my .NET assemblies from decompilation?
One thing to keep in mind is that you want to do this in a way that makes business sense. To do that, you need to define your goals. So, exactly what are your goals?
Preventing piracy? That goal is not achievable. Even native code can be decompiled or cracked; the multitude of warez available online (even products like Windows and Photoshop) is proof of that.
If you can't prevent piracy, then how about merely reducing it? This, too, is misguided. It only takes one person cracking your code for it to be available to everyone. You have to be lucky every time. The pirates only have to be lucky once.
On another note, I would recommend SmartAssembly by RedGate. Ive used this before and its great compared to others. Please note that like any obfuscator, you cannot stop someone cracking your software if they are determined to do so.
You can get more information here...
http://www.red-gate.com/products/dotnet-development/smartassembly/

Source code analyzing tool for COBOL on VMS/VAX Platform [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Can someone please recommend a tool for analyzing, improving, finding "dead code", provide statistics etc. for a source code on COBOL language on VMS/VAX OS and RDB Database?
Thanks.
Some compilers have options for locating dead code, so you may already have the tools you desire. Please keep in mind that there are going to be situations where the code is dead and you cannot tell via static source code analysis.
if a = 1
move 'error' to out-message
end-if
If a can never be 1 then this is dead code. Static source code analysis may not find more complicated instances of this scenario, particularly if the value of a comes from outside the program being analyzed - perhaps a database.
A cursory scan of the static source code analysis tools listed on Wikipedia shows the commercial products are pricy (thousands of euros). The open source tools don't appear to provide much COBOL coverage. You might want to check those out for yourself as I admit I didn't do a thorough evaluation but instead just scanned their documentation.
COBOL is a difficult language to parse.
I have never used it, but the DecSet suite of products includes a product called PCA - Performance and Coverage Analyser. This may be what you are looking for.

Need help designing an interpreter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
i'm thinking on doing an undergrad project on building an interpreter for a simple/rudimentary custom language (perl / C like). I would be be glad if someone could point me in the right direction to start. Most of the books/resources i find are on theoretical implementation of compilers. Are there any resources aimed at interpreters ? i'm thinking of implementing it in C++, but have very little knowledge on the subject of interpreter design, so any pointers to books/references will be appreciated
The parsing of the source code is not very much different between a compiler and an interpreter. And that is what most textbooks on compilers are about.
There are some nice tools now to implement custom languages.
You might want to checkout Xtext in the Eclipse Modelling Package (http://www.eclipse.org) or MPS (http://www.jetbrains.com/mps/), the language workbench of IntelliJ which is freely available.
Both allow you to create languages and provide the tools to generate code from the source and the tooling to help creating the code.
They also create abstract syntax trees which may be directly manipulated, i.e. executed. Then you have an interpreter.
The classical approach would be to use bison/yacc for as a lexer, respectively parser, and many newer tools are currently available like antlr. The output of the parser is then again the abstract syntax tree ready to do interprete or generate code from.
An Incremental Approach to Compiler Construction - it's about creating compilers, but it might be a good starting point to find references from.
I wrote an interpreter for reading and converting logic expressions at Uni. Wrote it in C, Lexx and Yacc which old school Unix and C programmers seem to swear by. Pretty powerful once you get the hang of them, but reasonably steep learning curve I would say.
http://www.lugbe.ch/action/reports/lex_yacc.pdf

SBCL standard library documentation? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I want to learn and use SBCL because of its ease of learning and speed. (I've been playing with Lisp 3 years ago, and now am refreshing it.) But how can I learn what's included in the standard library, so that I don't re-implement things?
After Python this is like a nightmare: the SBCL website has a manual that covers the software only, not a word on the standard library. (For comparison, Gnu Common Lisp's website has only sources and binaries.)
Firstly: that problem isn't really SBCL specific. The CL library is standardised and thus you can use the documentation of any lisp.
As mentioned, the CL HyperSpec is very useful. It is however a reference and thus not very suitable for learning in my opinion.
For learning, there are various books out there. I personally like these a lot:
ANSI Common Lisp by Paul Graham
Practical Common Lisp by Peter Seibel
Successful Lisp by David Lamkins
You should also look at existing code. I particularly enjoyed reading any of the libs by Edi Weitz but spread out and read from different sources to see how other people use Lisp and its huge library to solve problems.
If you can spend that much time you can even log onto IRC (the #lisp channel) and ask questions there. Or post code you have written to comp.lang.lisp and ask for a critique to learn via direct feedback.
Consult the Common Lisp HyperSpec for documentation about what is included in Common Lisp
Also, if you are learning lisp, consider using CLISP instead of SBCL. CLISP has (IMHO) a much more intuitive debugger. For any non-production stuff the difference between most Common Lisp implementations are negligible.
If you are developing on Windows, CLHS (Common Lisp HyperSpec) and CLtL2 (Common Lisp the Language, 2nd Edition) are available as CHM help files, which makes looking for CL standard library functions much easier. I find that it's faster than using the (online or offline) HTML version.
The CHM files are probably available from more than one source. One convenient download is:
http://www.daansystems.com/lispide/
(They're bundled with LispIDE package.)

iMacros is good but unreliable. Is there any alternative? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
iMacros is a very nice tool which allows to authomatically fill HTML forms and extract content, includes cycles and many other features. The problem is that it is quite tricky to make it extracting content properly. For example, I have failed to extract all London-to-Tokio flight prices for all the dates between 1/10/08 to 1/12/08 to find a cheapest one from expedia. Sometimes it just crashes. Does anyone know any good alternative?
Bah, I installed it but never really used it: I am happy enough with Greasemonkey.
Chickenfoot can make it more edible...
Searching for URLs, I found also DéjàClick and Selenium IDE but I don't really know them.
There are lot of other tools for Web automation, most of them professional (read "payware"...).
Alternatively, for just data extraction, I would use cURL or wget and a good HTML parser...
I have heard good things about Selenium IDE also and my limited testing indicates it is pretty capable, and works in Firefox and IE.
For most any macro based testing tool, you will need to do some programming if you need to support multiple, repeatable test cases.
That said, in your example you mention running an Expedia macro... presumably to scrape results. You will want to make sure that you don't hammer Expedia's servers, and/or expect to be booted once they discover you are (effectively) a bot.
I agree imacros is quite unreliable. They crash quite easily if you using complex algorithm or running it continously. The trick is to close it and open it again after loops. It will decrease the number of crash you will find, though not completely.