Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows defender alert users from my pyinstaller exe [duplicate]

I used pyinstaller to create exe file and sent it to some friends. it is harmless, but because it's --onefile the windows defender alert about it. the user need to allow permission to activate it, and it works. but with inconvenience. Any solution how to make sure windows defender won't alert about it from the start?

like image 901
Omri Avatar asked Feb 17 '19 13:02

Omri


People also ask

Which is better PyInstaller or py2exe?

In PyInstaller it is easy to create one exe, By default both create a bunch of exes & dlls. In py2exe its easier to embed manifest file in exe, useful for run as administrator mode in windows vista and beyond. Pyinstaller is modular and has a feature of hooks to include files in the build that you like.

Why is the .exe file created by PyInstaller not working?

The most common reason a PyInstaller package fails is that PyInstaller failed to bundle a required file. Such missing files fall into a few categories: Hidden or missing imports: Sometimes PyInstaller can't detect the import of a package or library, typically because it is imported dynamically.


1 Answers

It is necessary to exclude from check from all PC using that program by the following procedure.

Add an exclusion to Windows Security

  1. Go to Start > Settings > Update & Security > Windows Security > Virus & threat protection.
  2. Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions.
  3. Select Add an exclusion, and then select from files, folders, file types, or process. The exclusion will apply to subfolders within a folder as well.

In Addition:

For example, searching with "pyinstaller virus" in StackOverflow will find many articles.
pyinstaller virus

It seems that there is a similar article just recently.
Windows Defender detecting Python EXE as Trojan

As mentioned in this article, it has already been reported to developers of pyinstaller. There are various introductions of alternative means other than 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
This is introduced in the article below. What is Nuitka

However, it seems that none of them is safe after all.
Py2Exe detected as virus. Alternatives?

There seems to be workaround to recompile PyInstaller's bootloader "runw.exe".
Program made with PyInstaller now seen as a Trojan Horse by AVG
how to recompile the bootloader of Pyinstaller

like image 156
kunif Avatar answered Nov 15 '22 15:11

kunif