Add files via upload

This commit is contained in:
PYDT authored and GitHub committed 2025-02-13 06:24:22 -08:00
1 parent 0b1fffb5bf
commit 0723dc8dbb
1 file changed
+17 -11
+17 -11
View File
@@ -42,26 +42,32 @@ class DLScan:
"box": Image.Resampling.BOX, "bilinear": Image.Resampling.BILINEAR,
"hamming": Image.Resampling.HAMMING, "bicubic": Image.Resampling.BICUBIC,
"lanczos": Image.Resampling.LANCZOS, "nearest": Image.Resampling.NEAREST}
shell_section = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'cry', 'tvm', 'dec', 'enc', 'vmp', 'upx', 'lzma', 'pack', 'press',
'enigma', 'protect', 'secur']
unimportant_section = ['viahwaes', 'rodata', 'orpc', 'nep', 'ace',
'extjmp', 'no_bbt', 'data', 'hexpthk']
shell_section = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"cry", "tvm", "dec", "enc", "vmp", "upx", "aes", "lzma", "press",
"pack", "enigma", "protect", "secur"]
unimportant_section = ["!o", "ace", "asmstub", "b1_", "base",
"be", "bss", "clr_uef", "cursors", "data", "engine", "extjmp",
"fio", "fothk", "hexpthk", "h~;", "icapsec", "malloc_h", "zk",
"mssmixer", "ndr64", "nep", "no_bbt", "nsys_wr", "obr", "orpc",
"pad", "pgae", "poolmi", "proxy", "qihoo", "res", "tracesup",
"rwexec", "rygs", "s:@", "sanontcp", "segm", "test", "miniex",
"transit", "trs_age", "uedbg", "viahwaes", "wisevec", "wow",
"retpol", "rt", "wow64svc", "wpp_sf", "yg"]
self.shells = shell_section + unimportant_section #"""
def load_model(self, file_path):
try:
ftype = os.path.splitext(file_path)[-1].lower()
if ftype in [".json", ".txt"]:
with open(file_path, 'r') as f:
with open(file_path, "r") as f:
self.class_names = json.load(f)
elif ftype in [".onnx"]:
self.models[file_path] = onnxruntime.InferenceSession(file_path)
self.labels = self.class_names['Labels']
self.detect = self.class_names['Detect']
self.values = self.class_names['Values']
self.resize = self.class_names['Resize']
self.suffix = self.class_names['Suffix']
self.labels = self.class_names["Labels"]
self.detect = self.class_names["Detect"]
self.values = self.class_names["Values"]
self.resize = self.class_names["Resize"]
self.suffix = self.class_names["Suffix"]
except Exception as e:
pass