Added warning for dangerous files

This commit is contained in:
M66B
2022-09-17 22:03:53 +02:00
parent 9dee5e793b
commit 35e495cec1
5 changed files with 76 additions and 18 deletions

View File

@@ -145,6 +145,7 @@ import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
@@ -217,6 +218,25 @@ public class Helper {
")+"
);
// https://support.google.com/mail/answer/6590#zippy=%2Cmessages-that-have-attachments
static final List<String> DANGEROUS_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(
"ade", "adp", "apk", "appx", "appxbundle",
"bat",
"cab", "chm", "cmd", "com", "cpl",
"dll", "dmg",
"ex", "ex_", "exe",
"hta",
"ins", "isp", "iso",
"jar", "js", "jse",
"lib", "lnk",
"mde", "msc", "msi", "msix", "msixbundle", "msp", "mst",
"nsh",
"pif", "ps1",
"scr", "sct", "shb", "sys",
"vb", "vbe", "vbs", "vxd",
"wsc", "wsf", "wsh"
));
private static final ExecutorService executor = getBackgroundExecutor(1, "helper");
static ExecutorService getBackgroundExecutor(int threads, final String name) {