Compare commits

...
13 Commits
Author SHA1 Message Date
PYDT 5faee6a05f Add files via upload 2023-11-16 11:41:33 +08:00
PYDT 9213f9f54f Add files via upload 2023-11-16 10:39:56 +08:00
PYDT c5e8351d76 Delete PYAS_Rules.py 2023-11-16 10:39:12 +08:00
PYDT e8e245ac0b Add files via upload 2023-11-15 12:49:31 +08:00
PYDT 2d8d6851d1 Add files via upload 2023-11-15 11:39:51 +08:00
PYDT 54f3e2ceda Add files via upload 2023-11-15 00:27:26 +08:00
PYDT 81d98917c3 Add files via upload 2023-11-14 21:10:40 +08:00
PYDT 8651f1e5d6 Add files via upload 2023-11-10 16:14:39 +08:00
PYDT db1a26424d Add files via upload 2023-11-10 15:20:38 +08:00
PYDT 16405810dd Add files via upload 2023-11-10 10:07:45 +08:00
PYDT f4f7fc1b0c Add files via upload 2023-11-09 22:02:06 +08:00
PYDT e1145a743a Add files via upload 2023-11-09 21:33:02 +08:00
PYDT 6e5b54bbfe Add files via upload 2023-11-09 21:21:20 +08:00
3 changed files with 29 additions and 20 deletions

No files matched your search

+28 -19
View File
@@ -3,6 +3,7 @@ import hashlib, pefile, socket, msvcrt
import requests, pyperclip, win32file
import win32gui, win32api, win32con
import xml.etree.ElementTree as xmlet
from PYAS_Rules import pyasrule_dict
from PYAS_Function import function_list
from PYAS_Extension import slist, alist
from PYAS_Language import translate_dict
@@ -18,7 +19,7 @@ class MainWindow_Controller(QMainWindow):
self.setAttribute(Qt.WA_TranslucentBackground)
self.setWindowFlags(Qt.FramelessWindowHint)
self.pyas = str(sys.argv[0]).replace("\\", "/")
self.pyas_version = "2.9.1"
self.pyas_version = "2.9.2"
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.init_tray_icon()
@@ -268,7 +269,7 @@ class MainWindow_Controller(QMainWindow):
self.ui.Window_Block_Button.setText(self.trans("軟體彈窗攔截"))
self.ui.Repair_System_Network_Button.setText(self.trans("系統網路修復"))
self.ui.About_Back.setText(self.trans("返回"))
self.ui.PYAS_Version.setText(self.trans(f"PYAS V{self.pyas_version}"))
self.ui.PYAS_Version.setText(self.trans(f"PYAS V{self.pyas_version} (ML Engine)"))
self.ui.GUI_Made_title.setText(self.trans("介面製作:"))
self.ui.GUI_Made_Name.setText(self.trans("mtkiao"))
self.ui.Core_Made_title.setText(self.trans("核心製作:"))
@@ -838,8 +839,11 @@ class MainWindow_Controller(QMainWindow):
for vfl in function_list:
QApplication.processEvents()
max_vfl.append(len(set(fn)&set(vfl))/len(set(fn)|set(vfl)))
print(f'Virus:{int(max(max_vfl)*100)}%')
return max(max_vfl) > 0.9
if self.high_sensitivity and max(max_vfl) == 1.0:
return True
elif "_CorExeMain" not in fn and max(max_vfl) == 1.0:
return True
return False
except:
return False
@@ -1175,27 +1179,32 @@ class MainWindow_Controller(QMainWindow):
existing_processes.add(p.pid)
psutil.Process(p.pid).suspend()
name, file, cmd = p.name(), p.exe().replace("\\", "/"), p.cmdline()
if "powershell" in name and self.api_scan(cmd[-1].split("'")[-2]):
if self.protect_proc_scan(name, file, cmd):
p.kill()
self.send_notify(self.trans("惡意腳本攔截: ")+name)
elif "cmd.exe" in name and self.api_scan(" ".join(cmd[2:])):
p.kill()
self.send_notify(self.trans("惡意腳本攔截: ")+name)
elif ":/Windows" in file and self.api_scan(cmd[-1]):
p.kill()
self.send_notify(self.trans("惡意軟體攔截: ")+name)
elif ":/Windows" not in file and ":/Program" not in file:
if file != self.pyas and file not in self.whitelist:
if self.api_scan(file) or self.pe_scan(file):
p.kill()
self.send_notify(self.trans("惡意軟體攔截: ")+name)
elif self.sign_scan(file):
self.proc = p
self.send_notify(self.trans("惡意軟體攔截: ")+file)
elif ":/Windows" not in file and self.sign_scan(file):
self.proc = p
psutil.Process(p.pid).resume()
gc.collect()
except:
pass
def protect_proc_scan(self, name, file, cmd):
try:
if file != self.pyas and file not in self.whitelist:
if "powershell" in name:
file = str(cmd[-1].split("'")[-2])
elif "cmd.exe" in name:
file = str(" ".join(cmd[2:]))
elif ":/Windows" in file:
file = str(cmd[-1])
elif ":/Program" in file:
file = str(cmd[-1])
return self.api_scan(file) or self.pe_scan(file)
return False
except:
pass
def protect_file_thread(self):
hDir = win32file.CreateFile("C:/Users/",win32con.GENERIC_READ,win32con.FILE_SHARE_READ|win32con.FILE_SHARE_WRITE|win32con.FILE_SHARE_DELETE,None,win32con.OPEN_EXISTING,win32con.FILE_FLAG_BACKUP_SEMANTICS,None)
self.ransom_block = False
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1,7 +1,7 @@
import pyinstaller_versionfile
pyinstaller_versionfile.create_versionfile(
output_file="versionfile.txt",
version='2.9.1',
version='2.9.2',
company_name="PYAS Security",
file_description="Python Antivirus Software",
internal_name="PYAS",