EXE 没有(或加密)RCDATA?

发布于 2024-09-30 18:45:34 字数 166 浏览 5 评论 0原文

我正在使用 Delphi 2010 编译我的应用程序。我的问题(对于其他人来说可能不是问题)是,当您使用任何资源编辑器打开该 EXE 时,您可以看到保存表单数据的 RCDATA。我不喜欢我的程序被“暴露”,所以我想问你是否有什么技巧可以从 EXE 中删除该信息或对其进行加密,以便没有人(至少从资源编辑器)可以看到它?

I'm compiling my application with Delphi 2010. My problem (it may not be a problem for anybody else) is that when you open that EXE with any resource editor you can see RCDATA which holds forms data. I don't like an idea of my program being "exposed" so I want to ask you is there any trick to remove that information from EXE or encrypt it that nobody (at least from resource editor) can see it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

追我者格杀勿论 2024-10-07 18:45:34

您可以完全通过源代码创建表单。
相反:您不能使用表单设计器。

使用gexperts,您可以将现有表单转换为源表单。

加密和压缩不是解决方案。当应用程序可以加载资源时,工程师也可以这样做。

You may create your forms fully via source.
opposite: you can't use the form designer.

with gexperts you can convert existing forms to source.

encrypting and compressing is not a solution. when the app can load the resources a engineer can it do, too.

伤痕我心 2024-10-07 18:45:34

我编写了一个在 Delphi IDE 内部工作的 DFM 压缩器,用于在编译时压缩 DFM。然后它会在运行时动态解压缩它们。

我以 15 美元的价格出售它,并且附带 src。

目前它适用于 D7、D2006、D2007 和 D2009。我没有 D2010,但我最近获得了 XE,我将对其进行升级,并在不久的将来也可用于 XE。如果有人请求 XE,甚至 D2010 兼容性,我会努力尽快实现。

它称为 DeForM 系统,可以在此处找到。

我将它用于我的许多个人项目。

I have written a DFM compressor that works inside of the Delphi IDE to compress DFMs at compile time. It then decompresses them on the fly at runtime.

I sell it for $15 US and it comes with src.

It currently works with D7, D2006, D2007 and D2009. I don't own D2010 but I have recently gotten XE and I will be upgrading it and making it available for XE as well in the near future. If someone makes a request for XE, or even D2010 compatibility, I'll work to make that happen sooner.

It's called the DeForM System and can be found here.

I use it for a number of my personal projects.

第几種人 2024-10-07 18:45:34

您需要修改 VCL 源代码来教导表单加载器在其他地方获取资源。此外,编译还需要构建后步骤或从已编译的 EXE 中剥离资源并将其移动到单独的加密文件(例如)。所有这些都是手动工作,我从未听说过任何所描述的任务的自动化。

如果您的表单最终确定(即它们不会被进一步修改),您可以做的一件事是采用 GExperts 并使用他们的“组件到代码”专家在运行时创建表单及其内容。但修改此类表单将需要更改代码。

You would need to modify VCL source code to teach form loader to take resources elsewhere. Also, compilation would require post-build step or stripping resources from the compiled EXE and moving them to a separate encrypted file (for example). All of this is manual work, I never heard of any automation for described tasks.

One thing you could do IF your forms are finalized (i.e. they won't be modified further) is take GExperts and use their Component To Code expert to create forms and their contents in runtime. But modification of such forms will require changes in code.

九歌凝 2024-10-07 18:45:34

它实际上只保存您放置在表单上的组件的已发布属性和表单本身(实际上是每个表单的 DFM 文件的内容),而不是任何源代码。因此,即使有人提取了该数据,他们最多只能生成一个在视觉上看起来与您的表单相同的表单,但不会生成您为该表单编写的任何代码。

从资源编辑器中隐藏此类数据的一种方法是在运行时构建您在表单中使用的所有组件,而不是使用表单设计器。这样,DFM 资源将不包含它们的数据。据我所知,有一些工具能够接收 DFM 文件作为输入,并自动生成用于组件创建的运行时代码(例如 GExpert),以便您可以在表单的 OnCreate 事件处理程序中复制/粘贴代码。

另一种选择是使用 EXE 压缩器。压缩器将压缩您的 EXE 文件,因此文件的内容将被更改并且在解压缩之前无法使用。 UPX 等工具可以压缩 EXE 文件,并在执行 EXE 时即时解压缩。请注意,使用 UPX 等已知压缩器有一个缺点,即许多破解工具或破解者可以检测到它们并在处理 EXE 之前自动解压缩它。因此,如果您需要更高的安全性,最好选择定制压缩机。

It actually just holds published property of the components you drop on your forms and the form itself (actually the content of DFM file for each form), not any source code. So even if somebody extracts that data, they can at most produce a form visually looking the same as your form, but none of the codes you wrote for the form.

One way to hide such data from resource editors is to build all the components you use in your form at runtime, not using the form designer. This way, the DFM resource will not contain their data. As far as I remember, there are tools which are able to receive a DFM file as input, and generate runtime code for component creations automatically (e.g. GExpert), so that you could copy\paste the code in your form's OnCreate event-handler.

Another option is to use an EXE compressor. A compressor will compress your EXE file so the content of the file will be changed and not usable until being decompressed. Tools like UPX can compress your EXE file and decompress it on the fly when you execute the EXE. Take note that using known compressors like UPX has the drawback that many cracking tools or crackers can detect them and automatically decompress the EXE before processing it. So if you need more security, you'd better go for custom compressors.

三生一梦 2024-10-07 18:45:34

我没有使用过它,但是 Citadel for Delphi 会自动压缩和加密 EXE 中的 DFM 资源。看起来他们还没有更新过 Delphi 2009,但这正是您正在寻找的。

I haven't used it, but Citadel for Delphi does automatic compression and encryption of DFM resources in your EXE. It doesn't look like they've updated past Delphi 2009 yet, but it's exactly what you're looking for.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文