Finding out which language a program is written in.

This is a discussion on Finding out which language a program is written in. within the Tech Board forums, part of the Community Boards category; Guys, let's say I downloaded a software, like say, Adobe Reader 8.0. Is there any way to know which programming ...

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    1

    Finding out which language a program is written in.

    Guys, let's say I downloaded a software, like say, Adobe Reader 8.0. Is there any way to know which programming language it's written in?

    Thanks.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,853
    It's possible to make some educated guesses, based on say things like the format of some error messages say, but there's no sure-fire way which works for every program.

    Some programs are written in more than one language.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339
    If you disassemble the program you can normally tell from the output, e.g Visual basic looks very different to C/C++ disassembly, same with virtual machine code i.e Java/C# cant be spotted easily enough.
    TNT
    You Can Stop Me, But You Cant Stop Us All

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    One way I often is use using the Spy++ tool on the windows the application creates. From the window class names you can often guess the development environment used to create the programs. (E.g. MFC has very distinctive names. Borland Builder, too, but it uses the same for Delphi and C++ programs.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Back in the day...
    There was a program that would analyze the opcodes in an executable and tell you not only what language, but specifically what compiler, and even in some cases, which version of the compiler. This was back in the days of Turbo C, so im sure the program is outdated, but the technique is still valid im sure. It basically operates on teh assumption that not all compilers produce fully optimized code, and that certain instructions are always handled the same way by the compiler, but differently by other compilers. It then looks for the fingerprint of the executable, and checks an internal database to see fi it matches any known compiler profile.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  6. #6
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Hmm, that would be a nice tool to have handy. Not sure I would use it, but it sounds like something very spy-like that should be in the movies.

    "We got the identity of the hacker now. Nobody else writes a worm with this compiler these days."


  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    yeah, its odd sometimes having 30 years of experience in computers, some of the tools that I have lying around on 5 1/4 (or cassete) did some pretty amazing stuff back in the day. I make jaws drop all the time when people see what I can do with 2k of memory
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  8. #8
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    There're recognition tools; probably one of the most well known for Win32 is PEiD.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  9. #9
    Registered User
    Join Date
    Jan 2007
    Posts
    330
    According to some people, you can identify the langiage according to the number of bug reports a program gets :P

  10. #10
    Peace
    Join Date
    Aug 2001
    Posts
    1,510
    Yes, there are ways. I have an app named TestExe. I tried to find the webpage but its down, as well as an older site that hosted it previously. You may find it out there somewhere though but you'll need to test your google skills as testexe is a well used name.

    Heres the readme:

    Code:
    Originally made by Nild Productions
    Re-released by Personified IT
    
    TESTEXE is a program that will tell you the compiler a program was made in.
    Drag an executable file onto the TestEXE program to find out what compiler was used to make it.
    
    
    This version of TESTEXE can detect a total of 15 different types of files:
    	1.  Microsoft Visual C++ (may support all versions - hasn't been tested)
    	2.  Microsoft Visual Basic 3,4,5,6
    	3.  Visual Basic for DOS
    	4.  Borland C++
    	5.  Borland Delphi
    	6.  Borland Turbo Pascal (may support all versions - hasn't been tested)
    	7.  DJGPP
    	8.  Qbasic
    	9.  gcc
    	10.  Tasm
    	11.  Files compressed with PKLite
    	12.  WinRAR Self Extracting Archives
    
    
    E-mail -       info@personifiedit.com
    Homepage -     http://www.personifiedit.com
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 03:30 PM
  2. Why C Matters
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 136
    Last Post: 01-16-2008, 09:09 AM
  3. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 01:27 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  5. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 04:39 AM

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