Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ed8cc9380 | ||
|
|
142e9d1028 | ||
|
|
c96c30ff9a | ||
|
|
337f1cc100 | ||
|
|
c3cb89dbea | ||
|
|
445bd1f668 | ||
|
|
1bded908c1 | ||
|
|
8d9dea4b08 | ||
|
|
4e98d6d8ce | ||
|
|
55b5cd939e | ||
|
|
d72f5a43c8 | ||
|
|
b406d8d30b | ||
|
|
f9c91c9ba0 | ||
|
|
0213d7eeb4 | ||
|
|
048c5c0970 | ||
|
|
728542fce8 | ||
|
|
81ca24c7a2 | ||
|
|
32ec272253 | ||
|
|
758982b660 |
No files matched your search
@@ -1,12 +1,11 @@
|
||||
{
|
||||
"Suffix": [".com", ".exe", ".dll", ".sys", ".scr",
|
||||
".bat", ".cmd", ".ps1", ".vbs", ".wsf"],
|
||||
"Suffix": [".com", ".exe", ".dll", ".sys", ".scr", ".bat", ".cmd", ".ps1", ".vbs", ".wsf"],
|
||||
|
||||
"Labels": ["Pefile/White", "Script/White", "Pefile/General", "Script/General"],
|
||||
|
||||
"Detect": ["Pefile/General", "Script/General"],
|
||||
|
||||
"Pixels": [224, 224],
|
||||
"Resize": [224, 224, 1, "nearest"],
|
||||
|
||||
"Values": 90
|
||||
}
|
||||
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020-2024 87owo (PYAS Security)
|
||||
Copyright (c) 2020-2025 87owo (PYAS Security)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+17
-6
@@ -38,6 +38,10 @@ class YRScan:
|
||||
class DLScan:
|
||||
def __init__(self):
|
||||
self.models = {}
|
||||
self.valid_interpolations = {"none": Image.Resampling.NEAREST,
|
||||
"box": Image.Resampling.BOX, "bilinear": Image.Resampling.BILINEAR,
|
||||
"hamming": Image.Resampling.HAMMING, "bicubic": Image.Resampling.BICUBIC,
|
||||
"lanczos": Image.Resampling.LANCZOS, "nearest": Image.Resampling.NEAREST}
|
||||
self.shells = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '!o',
|
||||
'cry', 'test', 'ace', 'yg', 'obr', 'tvm', 'dec', 'enc', 'b1_', 'base',
|
||||
'bss', 'clr_uef', 'cursors', 'trs_age', 'engine', 'enigma', 'protect',
|
||||
@@ -58,8 +62,8 @@ class DLScan:
|
||||
self.models[file_path] = onnxruntime.InferenceSession(file_path)
|
||||
self.labels = self.class_names['Labels']
|
||||
self.detect = self.class_names['Detect']
|
||||
self.pixels = self.class_names['Pixels']
|
||||
self.values = self.class_names['Values']
|
||||
self.resize = self.class_names['Resize']
|
||||
self.suffix = self.class_names['Suffix']
|
||||
except Exception as e:
|
||||
pass
|
||||
@@ -67,7 +71,7 @@ class DLScan:
|
||||
def dl_scan(self, file_data):
|
||||
try:
|
||||
label_similarities = {label: [] for label in self.labels}
|
||||
image_data = self.preprocess_image(file_data, tuple(self.pixels))
|
||||
image_data = self.preprocess_image(file_data, tuple(self.resize))
|
||||
image_array = numpy.asarray(image_data).astype('float32') / 255.0
|
||||
image_expand = numpy.expand_dims(image_array, axis=(0, -1))
|
||||
for model_name, model in self.models.items():
|
||||
@@ -83,12 +87,19 @@ class DLScan:
|
||||
return False, False
|
||||
|
||||
def preprocess_image(self, file_data, target_size):
|
||||
width, height, channels, interpolation = target_size
|
||||
wah = int(numpy.ceil(numpy.sqrt(len(file_data))))
|
||||
file_data = numpy.frombuffer(file_data, dtype=numpy.uint8)
|
||||
image_array = numpy.zeros((wah * wah,), dtype=numpy.uint8)
|
||||
image_array[:len(file_data)] = file_data
|
||||
image = Image.fromarray(image_array.reshape((wah, wah)), 'L')
|
||||
return image.resize(target_size, Image.Resampling.NEAREST)
|
||||
if channels == 1:
|
||||
image = Image.fromarray(image_array.reshape((wah, wah)), 'L')
|
||||
elif channels == 3:
|
||||
image = Image.fromarray(image_array.reshape((wah, wah)), 'RGB')
|
||||
if width == 0 and height == 0:
|
||||
return image
|
||||
interpolations = self.valid_interpolations[interpolation.lower()]
|
||||
return image.resize((width, height), interpolations)
|
||||
|
||||
def get_type(self, file_path):
|
||||
match_data = {}
|
||||
@@ -102,8 +113,8 @@ class DLScan:
|
||||
any(shell in section_name.lower() for shell in self.shells)):
|
||||
match_data[section_name] = section.get_data()
|
||||
except:
|
||||
if ftype in [".bat", ".cmd", ".ps1", ".vbs", ".wsf", ".html", ".js",
|
||||
".txt", ".htm", ".hta", ".php", ".css", ".xml", ".json", ".wasm"]:
|
||||
if ftype in [".bat", ".cmd", ".ps1", ".vbs", ".wsf", ".html",
|
||||
".js", ".txt", ".htm", ".hta", ".php", ".css", ".xml", ".json"]:
|
||||
with open(file_path, 'rb') as file:
|
||||
match_data[ftype] = file.read()
|
||||
return match_data
|
||||
+1
-1
@@ -16,7 +16,7 @@ translate_dict = {
|
||||
"綠":"绿","態":"态","務":"务","連":"连","檢":"检","測":"测","關":"关",
|
||||
"強":"强","驅":"驱","為":"为","腳":"脚","單":"单","開":"开","擴":"扩",
|
||||
"惡":"恶","據":"据","庫":"库","經":"经","敗":"败","謝":"谢","別":"别",
|
||||
"載":"载","誤":"误","報":"报","鏈":"链","竄":"窜","蹤":"踪","記憶體":"内存",},
|
||||
"載":"载","誤":"误","報":"报","鏈":"链","竄":"窜","蹤":"踪","與":"与","記憶體":"内存",},
|
||||
"en_US": {"已開啟":"On","已關閉":"Off","已开启":"On","已关闭":"Off",",":", ",
|
||||
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website ",
|
||||
"腳本":"Script ","鏈式":"Chain ","記憶體":"Memory ","加載":"Load ",
|
||||
|
||||
+10
-12
@@ -1,12 +1,10 @@
|
||||
slist = [".exe",".dll",".sys",".com",".scr",
|
||||
".bat",".ps1",".vbs",".cmd",".js"]
|
||||
|
||||
alist = [".exe",".dll",".sys",".com",".scr",
|
||||
".zip",".7z",".rar",".tar",".gz",
|
||||
".js",".bat",".cmd",".ps1",".vbs",
|
||||
".ppt",".pptx",".wps",".txt",".rtf",
|
||||
".pdf",".xls",".xlsx",".doc",".docx",
|
||||
".jpg",".jpeg",".png",".webp",".gif",
|
||||
".mp3",".wav",".aac",".ogg",".flac",
|
||||
".mp4",".avi",".mov",".wmv",".mkv",
|
||||
".aux",".cur",".mui",".ttf",".efi"]
|
||||
file_types = [
|
||||
".exe",".dll",".sys",".com",".scr",
|
||||
".zip",".7z",".rar",".tar",".gz",
|
||||
".js",".bat",".cmd",".ps1",".vbs",
|
||||
".ppt",".pptx",".wps",".txt",".rtf",
|
||||
".pdf",".xls",".xlsx",".doc",".docx",
|
||||
".jpg",".jpeg",".png",".webp",".gif",
|
||||
".mp3",".wav",".aac",".ogg",".flac",
|
||||
".mp4",".avi",".mov",".wmv",".mkv",
|
||||
".aux",".cur",".mui",".ttf",".efi"]
|
||||
+1
-1
@@ -2,7 +2,7 @@ import pyinstaller_versionfile
|
||||
|
||||
pyinstaller_versionfile.create_versionfile(
|
||||
output_file="versionfile.txt",
|
||||
version='3.2.6',
|
||||
version='3.2.8',
|
||||
company_name="PYAS Security",
|
||||
file_description="Python Antivirus Software",
|
||||
internal_name="PYAS",
|
||||
|
||||
@@ -71,4 +71,4 @@ Other systems may experience software malfunctions or crash
|
||||
|
||||
Wix, mtkiao129, 0sha0, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
Copyright© 2020~2025 PYAS Security By 87owo
|
||||
+1
-1
@@ -65,4 +65,4 @@ Windows 8.1, 10, 11 (64-bit), 内存 500MB, 存储 200MB 或更高
|
||||
|
||||
Wix, mtkiao129, 0sha0, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
Copyright© 2020~2025 PYAS Security By 87owo
|
||||
+1
-1
@@ -65,4 +65,4 @@ Windows 8.1, 10, 11 (64-bit),記憶體 500MB, 磁碟容量 200MB 或更高
|
||||
|
||||
Wix, mtkiao129, 0sha0, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
Copyright© 2020~2025 PYAS Security By 87owo
|
||||
Reference in new issue
Block a user