查找使用的编程语言
找出应用程序是用什么编程语言编写的最简单的方法是什么? 我想知道程序exe文件中的vb或c++或delphi或.net等。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
找出应用程序是用什么编程语言编写的最简单的方法是什么? 我想知道程序exe文件中的vb或c++或delphi或.net等。
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(14)
请尝试 PEiD
当然,如果他们使用了打包程序, ,需要先进行一些拆包:)
Try PEiD
of course if they used a packer, some unpacking will need to be done first :)
启动它并使用 Process Explorer 检查它使用了哪些运行时 DLL。
如果这还不是很明显,请在网络上搜索这些 DLL 的引用。
大多数反汇编程序(我认为包括 Olly)可以轻松地向您显示 EXE 或 DLL 中包含的文本,有时这也可以提供线索。 Delphi 类型通常以 T 为前缀,如 TMyClass 中那样。
如果它是一个小型可执行文件,没有 DLL 引用,也没有文本,那么您可能是 SOL。 那时,您需要寻找特定编译器的习惯用法,而这主要是猜测。
Start it up and check what run-time DLLs it uses with Process Explorer.
If that doesn't make it immediately obvious, search the web for references to those DLLs.
Most disassemblers (including Olly I think) can easily show you the text contained in an EXE or DLL, and that can also sometimes give a clue. Delphi types are often prefixed with T as in TMyClass.
If it's a small executable with no DLL references and no text you might be SOL. At that point you'd need to look for idioms of particular compilers, and it would be mostly guesswork.
检测程序是用什么语言编写的是一门艺术。这是可能的,但没有硬性规定。 这需要大量的经验(而且它也会引出一个问题“你为什么想要……”,但这里有一些关于如何去做的想法。
你正在寻找的是一个“签名”。签名可以是编译器包含的某个字符串,对正在使用的编程工具中非常常见的 API 的引用,甚至是正在使用的工具中常见的编程风格,在包含的字符串中可见 此外,应用
程序的部署方式也有多种:部署目录中的各种配置文件、dll 和程序集,甚至
包装在自启动可执行文件中的图像、目录或图标都将包含对 java 的引用 。 libs,并且可能会在同一目录中包含某些库或文件,表明它是 java。
正如其他答案所示,托管程序集也会显示某些标志:您可以在 Reflector 等中打开它。虽然 c# 是正确的。和 VB 一旦编译后就可以“互换”,但它们并不完全相同。 如果您使用 Reflector 反汇编 VB 代码,您经常会看到程序集引用了Microsoft.VisualBasic.dll 程序集。 您将能够区分 Mono 应用程序,因为它们很可能包含对单声道组件。
许多编译器以某种方式汇编和链接代码,并留下足迹。 例如,使用 Process Explorer 中的“strings:”选项卡检查窗口可执行文件,您将看到很多字符串。使用这些字符串,您可以确定 exe 中的编程风格、调用的方法、错误或跟踪方法。
例如,编译器使用不同的本地化机制:Microsoft 将本地化字符串存储在 XML 文件中。 。
另一个例子是 c++ 名称修改 href="http://en.wikipedia.org/wiki/CodeWarrior" rel="noreferrer">CodeWarrior 编译器使用与 Visual Studio 不同的算法来修改调用的成员变量和函数的名称 我想
你可以写一本关于准确确定任何可执行文件的谱系的书,这个主题可能被称为“编程考古学”。
There is an art to detecting what language a program was written in. It is possible but there are no hard and fast rules. It takes a lot of experience (and it also leads to the question "Why would you want to..." but here are a few ideas on how to go about it.
What you're looking for is a "signature". The signature could be a certain string that is included by the compiler, a reference to an API that is quite common in the programming tool being used, or even a style of programing that is common to the tools being used, visible in the strings contained in the application.
In addition, there are styles to how an application is deployed: various configuration files found in the deployment directory, dlls and assemblies and even images, directories or icons.
Java applications wrapped in a self-launching executable will contain references to java libs, and will likely have certain libraries or files included in the same directory that indicate that it's java.
As indicated in other answers a managed assembly will show certain signs as well: you can open it in Reflector etc. While it is correct that c# and VB are "interchangable" once compiled, it is not true that they are identical. If you use Reflector to disassemble VB code you will quite often see that the assembly references the Microsoft.VisualBasic.dll assembly. You'll be able to tell the difference between Mono applications because they will most likely contain references to the mono assemblies.
Many compilers assemble and link code in certain ways, and leave footprints behind. For example, examining a window executable using "strings: tab in Process Explorer, you'll see a lot of strings. Using these you may be able to determine programming styles, methods called, error or trace methods withint the exe.
An example is that compilers use different mechanisms for localization: Microsoft stores localized strings in XML files or resource files. Other compilers will use a different tactic.
Another example is c++ name mangling. The CodeWarrior compiler uses a different algorithm to mangle the names of the member variables and functions of a call than Visual Studio.
I suppose you could write a book on the subject of accurately determining the lineage of any executable. This subject would probably be called "programming archeology".
您可以尝试使用 Depends 来查看它具有哪些运行时依赖项,这可能会提供一些线索。
You could try using Depends to see what runtime dependancies it has, which might give some clues.
最简单的方法是询问程序的开发人员。 它不需要任何知识和实用程序。
The easiest way is to ask the developer of the program. It does not require any knowledge and utility programs.
PE Detective 最适合我。
PE Detective works best for me.
编译语言(我的意思是没有脚本语言,或者Java、.NET等)被编译成CPU汇编指令,这本质上是一种单向转换。 通常不可能确定程序是用哪种语言编写的。但是,使用依赖项遍历器,您可以确定程序正在加载哪个运行时库(如果有),从而确定它使用哪种语言(例如 MS Visual C++ 9使用 msvcr90.dll)。
Compiled languages (by this I mean no scripting languages, or Java, .NET, etc.) are compiled into CPU assembly instructions, which is essentially a one-way conversion. It is not usually possible to determine which language a program was written in. However, using a dependency walker, you could potentially determine which runtime library the program was loading (if any) and therefore determine which language it used (e.g. MS Visual C++ 9 uses msvcr90.dll).
您可以通过尝试使用 ildasm.exe 工具打开来检查是否是 .net 程序集
you can check is that a .net assembly or not by trying to open with ildasm.exe tool
一般来说,你不能。
如果您可以将其加载到 Reflector 中,那么您就知道它是一个托管程序集。
In general, you can't.
If you can load it into Reflector, you know it is a managed assembly.
这是个好问题。 没有任何通用的方法可以区分,但我敢打赌大多数编译器和库都会在生成的 EXE 文件中留下标记。 如果你想花很多时间在这上面,你可以收集一堆用已知语言编写的 EXE 并扫描常见字符串。 我想你会找到一些。
Dependency Walker,其他人提到这将是寻找明显依赖项的好方法,例如 MSVCRT 的版本, ETC
That's a good question. There isn't any general way to tell, but I bet most compilers and libraries leave a mark in the resulting EXE file. If you wanted to spend a lot of time on it, you could gather a bunch of EXEs written in known languages and scan for common strings. I would image you'd find some.
Dependancy Walker, which someone else mentioned would be a good way to look for telltale dependencies, like versions of MSVCRT, etc
我尝试通过“字符串”程序运行 .exe 以获取各种提示。
i'd try running the .exe thru a 'strings' program to get assorted hints.
如果我没记错的话 PE Explorer Disassembler 提供了有关创建给定 not .net 和 java 的编译器的一些信息二进制文件,对于 .net,请使用 Reflector 或 ILDAsm 工具
If I remember correctly PE Explorer Disassembler gives some information about compiler that creates given not .net and java binary, for .net use Reflector or ILDAsm tool
我发现的最简单的方法(至少在电脑游戏中)是查看嵌套在游戏主文件夹中的“redist”文件夹。 对于一些在编程方面更有经验的人来说,这可能是显而易见的,但此文件夹中 MSI 的具体用途是允许 setup.exe 文件自动安装游戏本身的先决条件。
例如:
在《帝国全面战争》中,有一个名为“vcredist_x86-sp1.exe”的MSI。 这表明该游戏/程序是用Microsoft的.NET Framework中的“Visual C 2005”编写的(通常)。
事实上,如果您打开 MSI/EXE,安装程序应立即指示其编写的语言和版本。
我之所以熟悉,是因为我在 .NET Framework 中使用 C# 和 VB 进行编码,并且我们自动安装业务应用程序的先决条件。
希望这可以帮助!
The easiest way that I found (at least in computer games) was to look in the "redist" folder nested within the game's main folder. It might be obvious to some of you that are more experienced in programming yourself, but the specific purpose of the MSI in this folder is to allow the setup.exe file to automatically install the prerequisites for the game itself.
For example:
In Empire Total War, there is an MSI called "vcredist_x86-sp1.exe". This indicates that the game/program was written in Microsoft's "Visual C 2005" in the .NET Framework (usually).
In fact, if you open the MSI/EXE, the installer should immediately indicate the language it's written in and which version.
The reason I'm familiar is because I code in C# and VB in the .NET Framework and we auto-install the prerequisites for our business app.
Hope this helps!