Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5faee6a05f | ||
|
|
9213f9f54f | ||
|
|
c5e8351d76 | ||
|
|
e8e245ac0b | ||
|
|
2d8d6851d1 | ||
|
|
54f3e2ceda | ||
|
|
81d98917c3 | ||
|
|
8651f1e5d6 | ||
|
|
db1a26424d | ||
|
|
16405810dd | ||
|
|
f4f7fc1b0c | ||
|
|
e1145a743a | ||
|
|
6e5b54bbfe |
No files matched your search
@@ -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
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user