From 0723dc8dbbf72f6b04d3a6ec6fdb6936df1f812f Mon Sep 17 00:00:00 2001 From: PYDT <85057800+87owo@users.noreply.github.com> Date: Thu, 13 Feb 2025 06:24:22 -0800 Subject: [PATCH] Add files via upload --- PYAS_Engine.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/PYAS_Engine.py b/PYAS_Engine.py index b52561e..c9aaaf9 100644 --- a/PYAS_Engine.py +++ b/PYAS_Engine.py @@ -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