如何使应用程序不可移植?

发布于 2024-11-24 05:53:42 字数 205 浏览 5 评论 0原文

我正在尝试制作一个不应在计算机之间或
同一台计算机的用户之间移植的应用程序。
哪种方法最好?

编辑: 我所说的“不可移植”的意思是,如果不安装该应用程序就无法使用。即)将安装的文件夹移动到不同的计算机或同一计算机的不同用户登录。

我们怎样才能获得一个对于计算机中的用户登录始终唯一的ID?

请原谅我糟糕的英语。

I am trying to make an application that should not portable between computers or
between users of the same computer.
Which is the best way to do this?

edit:
By not portable I meant, the application should not be usable without installing it. ie) moving the installed folder to a different computer or different user login of the same computer.

How can we get an id that is always unique to a user login in a computer?.

please excuse my poor english.

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

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

发布评论

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

评论(3

南街九尾狐 2024-12-01 05:53:44

几乎无论您实现什么机制,其他用户始终能够反编译程序并相对轻松地绕过阻止运行​​的因素。两个例外:

  • 将关键功能 + 身份验证移至 c 模块中。这使得规避变得更加困难,但并非不可能

  • 将关键功能+身份验证转移到对在您控制的远程计算机上执行的程序的调用中。此处,其他用户需要根据示例输入和输出重新实现函数 - 直接逆向工程是不可能的。

相关问题的答案中更详细地介绍了这些要点。当然,正如一些答案所指出的那样,您需要确定您希望承担多少麻烦以及是否值得这样做。即使一个熟练的程序员可以解决它,也许一个简单的Python本机访问控制就足够了。

Almost no matter what mechanism you implement, the other user will always be able to decompile the program and route around what prevents running it with relative ease. Two exceptions:

  • Move key functionality + authentication into c modules. This makes circumvention harder, but not impossible

  • Move key functionality + authentication into a call to a program executing on a remote machine that you control. Here the other user needs to re-implement the function(s) based on sample input and output - direct reverse engineering is not possible.

These points are covered in further detail in the answers to the linked-to question. Of course, as some answers point out, you need to determine how much trouble you wish to go to and if it is worth your while to do so. Maybe a naive python native access control is enough deterrant, even if an adept programmer can work around it.

深巷少女 2024-12-01 05:53:44

让您的安装脚本将程序的某些模块复制到用户应用程序目录。
在您的程序中将该路径添加到 sys.path,该导入将找到您的模块。

Let your installation script copy some modules of your program to user application directory.
In your program add that path to sys.path, that import would find your modules.

勿忘初心 2024-12-01 05:53:44

如果您希望只有一个用户具有访问权限,则必须创建某种“登录”。

这就是注册或激活密钥的用途。

http://en.wikipedia.org/wiki/Product_key

您包含用户名和某些计算机密钥中的标识,

If you want only one user to have access you have to create some kind of "login".

That's what registration or activation keys are for.

http://en.wikipedia.org/wiki/Product_key

You include the user name and some machine identification in the key,

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