【发布时间】:2019-07-11 01:09:04
【问题描述】:
我使用 pyinstaller 创建 exe 文件并发送给一些朋友。它是无害的,但因为它是 --onefile,windows 防御者会警告它。用户需要允许激活它,并且它可以工作。但带来不便。 任何解决方案如何确保 Windows Defender 从一开始就不会提醒它?
【问题讨论】:
标签: python windows exe pyinstaller
我使用 pyinstaller 创建 exe 文件并发送给一些朋友。它是无害的,但因为它是 --onefile,windows 防御者会警告它。用户需要允许激活它,并且它可以工作。但带来不便。 任何解决方案如何确保 Windows Defender 从一开始就不会提醒它?
【问题讨论】:
标签: python windows exe pyinstaller
必须通过以下步骤从使用该程序的所有 PC 中排除检查。
Add an exclusion to Windows Security
- 转至开始 > 设置 > 更新和安全 > Windows 安全 > 病毒和威胁防护。
- 在病毒和威胁防护设置下,选择管理设置,然后在排除项下,选择添加或删除排除项。
- 选择添加排除项,然后从文件、文件夹、文件类型或进程中进行选择。排除也适用于文件夹中的子文件夹。
另外:
比如在StackOverflow中用“pyinstaller virus”搜索会发现很多文章。
pyinstaller virus
好像最近有一篇类似的文章。
Windows Defender detecting Python EXE as Trojan
如本文所述,已向 pyinstaller 的开发者报告。除了pyinstaller,还有各种替代方式的介绍。
Virus warnings after trying to run .py program converted to an .exe file
AVG (and other antiviruses) reports exe file as containing virus #603
Freezing Your Code
这将在下面的文章中介绍。 What is Nuitka
但是,它们似乎都不是安全的。
Py2Exe detected as virus. Alternatives?
似乎有重新编译 PyInstaller 的引导加载程序“runw.exe”的解决方法。
Program made with PyInstaller now seen as a Trojan Horse by AVG
how to recompile the bootloader of Pyinstaller
【讨论】: