Compare commits

...
19 Commits
Author SHA1 Message Date
PYDT 7ed8cc9380 Add files via upload 2025-02-06 23:38:20 -08:00
PYDT 142e9d1028 Add files via upload 2025-02-05 06:56:05 -08:00
PYDT c96c30ff9a Add files via upload 2025-02-04 19:22:57 -08:00
PYDT 337f1cc100 Add files via upload 2025-02-04 19:21:48 -08:00
PYDT c3cb89dbea Add files via upload 2025-02-02 08:53:39 -08:00
PYDT 445bd1f668 Add files via upload 2025-02-02 08:51:46 -08:00
PYDT 1bded908c1 Add files via upload 2025-01-13 13:28:19 +08:00
PYDT 8d9dea4b08 Add files via upload 2025-01-06 21:25:37 +08:00
PYDT 4e98d6d8ce Add files via upload 2025-01-02 19:41:57 +08:00
PYDT 55b5cd939e Add files via upload 2024-12-31 23:52:47 +08:00
PYDT d72f5a43c8 Update README_zh_TW.md 2024-12-31 20:05:29 +08:00
PYDT b406d8d30b Update README_zh_CN.md 2024-12-31 20:05:13 +08:00
PYDT f9c91c9ba0 Update README.md 2024-12-31 20:04:50 +08:00
PYDT 0213d7eeb4 Merge pull request #30 from ABCblock/main
Update PYAS_Language.py
2024-12-31 19:58:09 +08:00
ABCblock 048c5c0970 Update PYAS_Language.py 2024-12-31 19:29:18 +08:00
PYDT 728542fce8 Add files via upload 2024-12-31 09:11:01 +08:00
PYDT 81ca24c7a2 Update LICENSE.md 2024-12-31 09:09:33 +08:00
PYDT 32ec272253 Add files via upload 2024-12-31 08:09:25 +08:00
PYDT 758982b660 Add files via upload 2024-12-30 22:15:53 +08:00
11 changed files with 846 additions and 778 deletions

No files matched your search

+2 -3
View File
@@ -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
View File
@@ -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
+811 -751
View File
File diff suppressed because it is too large. Load diff
+17 -6
View File
@@ -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
View File
@@ -16,7 +16,7 @@ translate_dict = {
"綠":"绿","態":"态","務":"务","連":"连","檢":"检","測":"测","關":"关",
"強":"强","驅":"驱","為":"为","腳":"脚","單":"单","開":"开","擴":"扩",
"惡":"恶","據":"据","庫":"库","經":"经","敗":"败","謝":"谢","別":"别",
"載":"载","誤":"误","報":"报","鏈":"链","竄":"窜","蹤":"踪","記憶體":"内存",},
"載":"载","誤":"误","報":"报","鏈":"链","竄":"窜","蹤":"踪","與":"与","記憶體":"内存",},
"en_US": {"已開啟":"On","已關閉":"Off","已开启":"On","已关闭":"Off",",":", ",
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website ",
"腳本":"Script ","鏈式":"Chain ","記憶體":"Memory ","加載":"Load ",
+10 -12
View File
@@ -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
View File
@@ -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",
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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