在python代码中包含可执行文件
我想保护我的python文件+py2exe whit DmiDecode for Windows() ,bat我想创建独立文件 是否可以在python代码中包含DmiDecode(在ram内存中运行以获取uuid),而不在hdd上进行写操作 我的实际代码是:在python代码中包含可执行文件,python,Python,我想保护我的python文件+py2exe whit DmiDecode for Windows() ,bat我想创建独立文件 是否可以在python代码中包含DmiDecode(在ram内存中运行以获取uuid),而不在hdd上进行写操作 我的实际代码是: def lic(): try: if hashlib.md5(open('c:\dmidecode.exe', 'rb').read()).hexdigest() != 'bca173dc4758676dd812c7
def lic():
try:
if hashlib.md5(open('c:\dmidecode.exe', 'rb').read()).hexdigest() != 'bca173dc4758676dd812c7632017d0ae':
sys.exit(1)
out = os.popen("c:\dmidecode.exe -s system-uuid").read().strip()
if out not in licente_valide:
sys.exit(1)
except:
sys.exit(1)
lic()
您需要解码哪些信息?我很确定你可以通过原始python获得它。dmidecode是在GPL下授权的。如果您确实包含它,您还必须携带关于使用python dmidecode的GPL许可证信息,如下所述: