保护vb.net中的软件仅在一台计算机上运行
我开发了一个小型应用程序,现在我想保护它。
我只想在我自己的计算机上运行它,并且我自己开发了它。
我怎样才能做到这一点?
I have developed a small application and now i want to protect it.
I want to run it only on my own computer and i have developed it for myself.
How can i do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
A. 不要发布它。
B. 在代码中硬编码您的计算机名称,并使程序执行的第一件事是验证
System.Environment.MachineName
与其匹配。A. Don't publish it.
B. Hard-code your computer name in the code, and make the first thing the program does to be verifying that
System.Environment.MachineName
matches it.您可以随时检查处理器 ID 或主板序列号。
取自以下位置: http://www.vb-helper.com/howto_net_get_cpu_serial_number_id.html
这是一个问题 Jim 将其转换为 Option Strict。
You could always check the processor ID or motherboard serial number.
Was taken from where: http://www.vb-helper.com/howto_net_get_cpu_serial_number_id.html
Here's a question by Jim to convert this for Option Strict.
这实际上取决于谁是“敌人”。
如果您希望保护它免受贪婪的、非破解者的朋友的侵害,那么您可以简单地仅在注册表中找到某个密码(使用加密安全散列函数)时才运行该应用程序,或者按照 Jay 的建议使用 MachineName 。
但如果您正在考虑保护它免受严重“敌人”的侵害,请注意:数学证明只要硬件不安全,在其上运行的任何软件本质上都是不安全的。这意味着每个软件都是可破解的,任何保护机制都是可绕过的(甚至是安全硬件设备,例如 Alladin 的 Finjan USB 产品密钥,因为其余硬件都是不安全的)。
由于当今大多数(如果不是全部)硬件都不安全,因此您根本无法在软件中获得 100% 的安全性。
在这两者之间,有许多用于许可和复制保护的安全解决方案。这一切都取决于谁是敌人以及威胁是什么。
It really depends on who is the "enemy".
If you wish to protect it from your greedy, non-cracker, friends, then you can simply have the application run only if a certain password is found in the registry (using a cryptographically secure hash function), or use the MachineName as Jay suggested.
But if you're thinking of protecting it from serious "enemies", do notice: It has been mathematically proven that as long as the hardware is insecure, any software running on it is inherently insecure. That means that every piece of software is crackable, any protection mechanism is bypassable (even secured-hardware devices such as Alladin's Finjan USB product key, since the rest of the hardware is insecure).
Since most (if not all) of today's hardware is insecure, you simply cannot get 100% security in a software.
In between, there are lots of security solutions for licensing and copy-protection. It all comes down to who is the enemy and what is the threat.
无论您多么努力,如果有人真的想在另一台计算机上运行它,他们就会的。
所有需要做的就是对你的保护进行逆向工程以
No matter how hard you try, if someone really want to run it on another computer, they will.
All need to do is reverse engineer your protection to
另一种选择可能是让您的程序向用户询问一个具有派生答案的问题。这是一个脑死亡的例子......
你的程序:“现在几点了?”
您输入:(TheYear + 10 - theDay + 11) Mod 13
这样,实际上只有您可以运行该程序,而不是依赖于机器。
Another option might be to have your program ask the USER a question that has a derived answer. Here's a brain dead example....
Your Program: "What time is it now?"
You Enter: (TheYear + 10 - theDay + 11) Mod 13
In this way its actually ONLY YOU that can run the program instead of it being MACHINE dependent.
我在 VB DOS 中做过这样的事情。
我要么制作了一个不可删除的文件,该文件是特定机器的关键,其中包含代码,和/或读取 .pwl 文件并进行多项检查,这些检查仅在您的机器上。不可编辑的文件是用诸如 char 233 之类的扩展字符集制成的,因此当人们尝试查看它时,它将打开一个空白副本(编辑)(write.ex),因此无法读取数据,也无法编辑移动数据或删除。
它需要是某些字符;我不确定 128 到 255 之间的每个宪章是否都能发挥作用,有些扩展角色可以做到这一点,有些则不行,它也可以被击败,但它会把一些人拒之门外,
但是它可以在程序环境中读取或检查。没有什么是完全安全的,这是我搞乱的一些事情。
注意:该文件将很难删除,也许可以创建一个测试目录来测试这一点。
我希望这没关系,我不太擅长向人们传达信息;我从 1982 年就开始编程。
I have made things like this in VB DOS.
I either made a non-deletable file that is key to a specific machine with a code inside, and/or read the .pwl files and have several checks, that are only on your machine. The non-editable file is made with extended character sets like char 233 so when a person tries to look at it, it will open a blank copy (edit) (write.ex), so data cannot be read and it cannot be edited moved or deleted.
It needs to be certain characters; I am not sure if every charter between 128 and 255 will work it, some extended characters work to do this some will not, also it can be defeated, but it will keep some people out,
But it can be read or checked in a program environment. Nothing is totally secure, this is some of the things I mess with.
Note: the file will be very hard to delete, maybe make a test directory to test this.
I hope this is OK I am not very good at conveying info to people; I have programmed since 1982.
另一个想法...我编写了一个不能直接运行的程序,它只能由外部文件运行,因此您可以在其中添加密码输入部分并加密密码,这样它就不能很容易地读取,我制作了一个可执行文件要测试的 vb 程序版本。它在松弛空间中写入一个字符,因此如果程序看到该值,它将不会运行,但是运行程序有一个不同的字符,并将其更改为该字符,并且该程序被设计为仅在该字符是时才允许进入正确的,仅由跑步者制作,然后当它进入时,它会变回来,这样它就不会保持打开状态,我做了这种事情,它确实有效,总有一种方法可以击败任何保护,目标是如果您不希望他们这样做,则可以减慢他们的速度或阻止他们运行或使用您的程序。我可能会在以后提供示例。
Another idea ... I wrote a program that cannot be run directly, it is only ran by an external file, so you could add in a password entry section to it and encrypt password so it cannot be read very easily ,I made an executable version of a vb program to test. it writes in to slack space a character so if the program sees that value it will not run, BUT the runner program has a different character, and it changes it to that character ,and the program is designed to only let in if the character is the proper one ,made only by the runner , then when it enters it changes it back so it is not left open , I have made this sorta thing, and it does work, there is always a way to defeat any protection , the goal is to slow them down or discourage them from running or using your program if you do not want them to.I may include examples at a later date.