如何在C ++中读取exe文件 [英] How to read the exe file in C++

查看:348
本文介绍了如何在C ++中读取exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何读取.exe文件以c ++加密和解密任何一个帮助PLZ



我试过的:



i查看很多网站的源代码,但我无法理解主要概念帮助我plz

how to read the .exe file to encrypt and decrypt in c++ any one help plz

What I have tried:

i look into many sites source codes but i m unable to understand the main concept help me plz

推荐答案

EXE文件通常不加密 - 它们是计算机可以遵守的二进制指令。



你不能解密普通的EXE文件得到类似于原始输入的东西:编译器将诸如C ++之类的更高级语言翻译为机器代码,对其进行优化,并生成一个二进制文件,该文件无法再次转换回C ++。



如果您的特定EXE已加密,您需要询问原作者如何解密,因为我们完全没有参与,因为它违反了版权和许可协议。
EXE files aren't normally encrypted - they are binary instructions that the computer can obey.

You can't "decrypt" a normal EXE file to get anything like the original input: the compiler "translates" a higher level language such as C++ into machine code, optimises it, and produces a binary file which cannot easily be converted back to C++ again.

If your particular EXE is encrypted, you would need to ask the original authors how to decrypt it, as we are not involved in that at all as it is in violation of copyright and licence agreements.


也许您可以使用 PE格式打包器,这里是一个概述:可执行压缩 - 维基百科 [ ^ ]

这是一篇关于包装工的有趣文章: [这些包装工 - 不是来自威斯康星州]
Maybe you can use a PE format packer, here is an overview: Executable compression - Wikipedia[^]
Here is an interesting article about "Packers": [these-packers-are-not-from-wisconsin]


1。加密您的可执行文件(如Richard所述,请参阅:加密和解密(Windows) [ ^ ])并将加密文件保存到磁盘。

2.将加密文件作为资源嵌入可执行文件中:如何:导入和导出资源 [ ^ ]

3.使用 FindResource [ ^ ]然后 LoadResource [ ^ ]访问加密文件。

4解密文件数据(如上面Richard所述)



祝你好运

Espen Harlinn
1. Encrypt your executable ( as mentioned by Richard, see: Encrypting and Decrypting (Windows)[^] ) and save the encrypted file to disk.
2. Embed the encrypted file as a resource in your executable: How to: Import and Export Resources[^]
3. Use FindResource[^] and then LoadResource[^] to access the encrypted file.
4. Decrypt the file data ( as mentioned by Richard above )

Best regards
Espen Harlinn


这篇关于如何在C ++中读取exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆