将标识符嵌入可执行文件以供下载
是否可以自动将唯一标识符“嵌入”到可执行文件中并读取它?又该如何做呢?
例如,约翰登录我的网站,然后按“下载我的软件”,它将收到一个包含他的信息的专门制作的可执行文件。是否可以 ?以及如何实现?
Is it possible to automatically "embed" a unique identifier into a executable and read it ? And how to do it ?
For example, John log into my site, and press "Download my software", it will receive a specialized crafted executable with his info. Is it possible ? And how to accomplish ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当然可以,只需在源代码中创建一个 const 字符串
,然后将 exe 作为二进制文件打开,并用 info.txt 文件替换已知值。但是,我怀疑这是否会帮助您完成一些有用的事情,特别是如果您的目标是防止盗版。您想要执行此操作的场景是什么?
Sure it's possible, just create a const string in your source code
Then open up the exe as a binary file and replace the known value with the info. However, I doubt that this will help you accomplish something useful, especially if your goal is to prevent piracy. What is your scenario where you want to do this?
是的。这当然取决于您的可执行文件是如何构建的。我们假设有一个 Windows PE 可执行文件。它有一个资源部分,可以相当容易地更新(不需要重新编译)。可能的资源类型之一是字符串表。这意味着您可以相当轻松地更改任何字符串。在可执行文件中,您可以通过
加载字符串
Yes. It of course depends on how your executable is built. Let's assume a Windows PE executable. It has a resource section, which can be updated fairly easily (doesn't require reompile). One of the possible resource types is a string table. That means you can change any string fairly easily. From within the executable, you can access this table via
LoadString