Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is There a Way to Tell What Language Was Used for a Program?

I have a desktop program I downloaded and installed. It runs from an .exe file.

Is there some way from the .exe file to tell what programming language was used to write the program?

Are there any tools are available to help with this?

What languages can be determined and which ones cannot?


Okay here are two of the sort of things I'm looking for:

  1. Tips to Determine Whether an App is Written in Delphi or Not

  2. This "IsDelphi" program by Bruce McGee will find all applications built with Delphi, Delphi for .Net or C++ Builder that are on your hard drive.

like image 969
lkessler Avatar asked Dec 30 '09 03:12

lkessler


People also ask

How can you tell what language a website is coded in?

Look at the Source Code The source code of a website is easily accessible from your browser. In Chrome, look for Developer Tools, in Firefox look for Web Developer in your menu. The source code's file extensions and URLs can tell you what type of platform the website is built on.

Can you translate a programming language?

You can convert the source code from one language into a code in a different language. Interpreting a programming language, however, is unnecessary and not possible at present. Humans can't interpret programming languages for machines, but they can debug, troubleshoot, or tweak codes if they have issues with them.


2 Answers

I use WinDowse (a small freeware utility written in Delphi) to spy the windows of the program.. for example if you look at the "Class" TabSheet you can discover the "Class" Name of the control..

For example:

  • TFormXX, TEditYY, TPanelZZZ for delphi apps
  • WindowsForms10.XXXX.yyy, for .NET apps
  • wxWindowsXXX for wxWindows apps
  • AfxWndXX for MFC/VC++ apps (I think)

I think this is the fastest way (although not the most accurate) to find information about apps..

like image 173
paolorossi Avatar answered Nov 16 '22 00:11

paolorossi


I understand your curiosity.

You can identify Delphi and C++ Builder apps and their SKU by looking for a couple of specific resources that the linker adds. Specifically RC Data\DVCLAL and RC DATA\PACKAGEINFO. The XN Resource Editor makes this a lot easier, but it might choke on compressed EXEs.

EXE compressors complicate things a little. They can hide or scramble the contents of the resources. Programs compressed with UPX are easy to identify with a HEX editor because the first 2 sections in the PE header are named UPX0 and UPX1. You can use the app to decompress these.

Applications compiled with .Net aren't difficult to detect. Recent versions of Delphi even include an IsAssembly function, or you could do a little spelunking in the PE header. Check out the IsManaged function in IsDelphi.

Telling which .Net language was used is trickier. By default, VB.Net includes a reference to Microsoft.VisualBasic, and VCL.Net apps included Borland specific references. However, VCL.Net is defunct in favour of Delphi Prism, and you can add a reference to the VB assembly to any managed language.

I haven't looked at some of the apps that use signatures to identify the the compiler, so I don't know how well they work.

I hope this helps.

like image 36
Bruce McGee Avatar answered Nov 16 '22 02:11

Bruce McGee