【问题标题】:Prevent users from using the program on more than one computer防止用户在多台计算机上使用该程序
【发布时间】:2022-01-10 21:27:21
【问题描述】:

我用 Python Tkinder 做了一个离线程序,现在我想把这个程序卖给客户,但是我想找到一种方法来阻止客户在多台计算机上使用这个程序,我知道我可以做到通过使用 Mac 地址或硬件部件号,但客户无法向我提供此数据 我该怎么做呢

【问题讨论】:

  • 除非您强制使用某种硬件密钥来使用该程序,否则我看不到在不连接到互联网的情况下执行此操作的方法(当然要求您的客户在线随时使用该程序)。如果客户同意向您提供识别他们打算用来访问该程序的特定计算机的信息,您可以将代码添加到您的程序中,以便仅当它在托管设备上检测到该签名时才运行。

标签: python tkinter desktop-application offline


【解决方案1】:

您可以使用mac address,(在每种情况下都不同)来指定每个设备。 例如,

from uuid import getnode as get_mac
import os

def welcome():
    print('welcome user!')

purchased = false; # this will be declared true after payment.

if ((not os.path.exists('devId')) and purchased):
    # activation after payment
    open('devId', 'wt').write(str(get_mac()));
    welcome();
elif (open('devId', 'rt').read() == get_mac()):
    print('Purchase before using!')
    exit()
else:
    welcome();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-19
    • 1970-01-01
    • 2011-08-07
    • 2017-02-04
    • 2014-02-18
    • 2021-08-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多