Compare commits

...
50 Commits
Author SHA1 Message Date
PYDT acbcaa337e Add files via upload 2023-11-30 08:21:54 +08:00
PYDT f4dbe57244 Add files via upload 2023-11-30 00:07:59 +08:00
PYDT b494c64a2f Add files via upload 2023-11-29 22:28:22 +08:00
PYDT 321e086b95 Add files via upload 2023-11-29 15:12:49 +08:00
PYDT fb60d6b867 Add files via upload 2023-11-29 13:08:38 +08:00
PYDT 8ff2e2074a Delete PYAS_Function_Safe.7z 2023-11-28 18:45:40 +08:00
PYDT 1151a1c43f Add files via upload 2023-11-28 18:45:16 +08:00
PYDT 13bc6cecc4 Add files via upload 2023-11-28 13:29:09 +08:00
PYDT a4ea572458 Add files via upload 2023-11-28 01:02:21 +08:00
PYDT 880df4dee9 Add files via upload 2023-11-27 19:31:39 +08:00
PYDT b75e86dd11 Add files via upload 2023-11-27 18:08:54 +08:00
PYDT 75c84092ae Add files via upload 2023-11-27 12:42:50 +08:00
PYDT c69db97da8 Add files via upload 2023-11-27 12:16:53 +08:00
PYDT 9c2a8892ae Add files via upload 2023-11-27 06:39:02 +08:00
PYDT f92111563c Add files via upload 2023-11-26 22:01:51 +08:00
PYDT 0abb3e78cb Add files via upload 2023-11-26 15:51:40 +08:00
PYDT fb83071419 Add files via upload 2023-11-26 12:56:33 +08:00
PYDT f593c6df8b Add files via upload 2023-11-26 12:51:13 +08:00
PYDT 9b452b25c2 Add files via upload 2023-11-25 21:47:21 +08:00
PYDT c835fcf99a Add files via upload 2023-11-25 20:23:47 +08:00
PYDT e4373edc54 Add files via upload 2023-11-25 19:59:51 +08:00
PYDT 686c05785f Add files via upload 2023-11-25 17:12:59 +08:00
PYDT 994358a793 Add files via upload 2023-11-25 16:58:41 +08:00
PYDT b02ca3757c Add files via upload 2023-11-25 16:14:41 +08:00
PYDT 164ec25415 Add files via upload 2023-11-25 14:58:27 +08:00
PYDT 8ee85cd9ca Add files via upload 2023-11-25 14:20:24 +08:00
PYDT c07bf05754 Add files via upload 2023-11-25 13:09:25 +08:00
PYDT 2e2a08a765 Add files via upload 2023-11-24 23:30:33 +08:00
PYDT 10be5f442f Add files via upload 2023-11-24 20:21:25 +08:00
PYDT 0fcd8565d8 Add files via upload 2023-11-24 12:08:55 +08:00
PYDT e07eee86dd Add files via upload 2023-11-24 09:09:49 +08:00
PYDT f25d5d73c6 Add files via upload 2023-11-23 23:31:26 +08:00
PYDT 28b4d00d3c Add files via upload 2023-11-23 22:48:46 +08:00
PYDT c75cf8a539 Add files via upload 2023-11-23 20:08:54 +08:00
PYDT ff7199b857 Add files via upload 2023-11-23 17:58:09 +08:00
PYDT 5613fd81b7 Update README.md 2023-11-23 16:00:46 +08:00
PYDT c1458502f7 Update README.md 2023-11-23 15:56:19 +08:00
PYDT b2f620bd3d Add files via upload 2023-11-23 15:07:41 +08:00
PYDT 0e1030f186 Add files via upload 2023-11-23 14:55:15 +08:00
PYDT ff4ffb8ec5 Add files via upload 2023-11-23 14:34:25 +08:00
PYDT 941458a381 Add files via upload 2023-11-22 14:49:09 +08:00
PYDT 560eb924b8 Add files via upload 2023-11-21 20:48:57 +08:00
PYDT c3fab9e48b Add files via upload 2023-11-21 20:31:50 +08:00
PYDT fc4dc74f9e Add files via upload 2023-11-21 20:16:16 +08:00
PYDT 35f0362910 Update README.md 2023-11-21 14:59:18 +08:00
PYDT 27dfaa5f06 Add files via upload 2023-11-21 14:52:06 +08:00
PYDT cf1866710a Delete PYAS_Function.zip 2023-11-21 14:51:37 +08:00
PYDT b3a5d06c4a Add files via upload 2023-11-21 14:40:38 +08:00
PYDT 7c904ff331 Add files via upload 2023-11-16 14:25:47 +08:00
PYDT c7855a9dd1 Add files via upload 2023-11-16 13:40:33 +08:00
5 changed files with 41 additions and 40 deletions

No files matched your search

+38 -37
View File
@@ -3,7 +3,6 @@ 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
@@ -19,7 +18,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.2"
self.pyas_version = "2.9.4"
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.init_tray_icon()
@@ -532,8 +531,9 @@ class MainWindow_Controller(QMainWindow):
self.timer.start(2)
def showMinimized(self):
self.hide_pyas_ui()
self.send_notify(self.trans("PYAS 已最小化到系統托盤圖標"))
if self.block_window:
self.hide_pyas_ui()
self.send_notify(self.trans("PYAS 已最小化到系統托盤圖標"))
def closeEvent(self, event):
if QMessageBox.warning(self,self.trans("警告"),self.trans("您確定要退出 PYAS 和所有防護嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
@@ -835,14 +835,13 @@ class MainWindow_Controller(QMainWindow):
fn.append(str(func.name, "utf-8"))
except:
pass
max_vfl = []
for vfl in function_list:
QApplication.processEvents()
max_vfl.append(len(set(fn)&set(vfl))/len(set(fn)|set(vfl)))
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
similarity = len(set(fn)&set(vfl))/len(set(fn)|set(vfl))
if self.high_sensitivity and similarity >= 0.9:
return True
elif "_CorExeMain" not in fn and similarity == 1.0:
return True
return False
except:
return False
@@ -948,6 +947,8 @@ class MainWindow_Controller(QMainWindow):
for i in Permission:
try:
win32api.RegDeleteValue(key,i)
self.proc.kill()
self.send_notify(self.trans("惡意行為攔截: ")+self.proc.name().replace("\\", "/"))
except:
pass
win32api.RegCloseKey(key)
@@ -1175,47 +1176,47 @@ class MainWindow_Controller(QMainWindow):
time.sleep(0.05)
for p in psutil.process_iter():
try:
if p.pid not in existing_processes:
name, file, cmd = p.name(), p.exe().replace("\\", "/"), p.cmdline()
if p.pid not in existing_processes and file not in self.whitelist:
existing_processes.add(p.pid)
psutil.Process(p.pid).suspend()
name, file, cmd = p.name(), p.exe().replace("\\", "/"), p.cmdline()
if self.protect_proc_scan(name, file, cmd):
if ":/Windows" in file and "powershell" in name:
file = str(cmd[-1].split("'")[-2]).replace("\\", "/")
elif ":/Windows" in file and "cmd.exe" in name:
file = str(" ".join(cmd[2:])).replace("\\", "/")
elif ":/Windows" in file and "msiexec.exe" in name:
file = str(cmd[-1]).replace("\\", "/")
elif ":/Windows" in file and "cscript.exe" in name:
file = str(cmd[-1]).replace("\\", "/")
elif ":/Windows" in file and "wscript.exe" in name:
file = str(cmd[-1]).replace("\\", "/")
if ":/Windows" in file or ":/Program" in file:
if self.sign_scan(file) and self.api_scan(file):
p.kill()
self.send_notify(self.trans("惡意軟體攔截: ")+file)
elif self.api_scan(file) or self.pe_scan(file):
p.kill()
self.send_notify(self.trans("惡意軟體攔截: ")+file)
elif ":/Windows" not in file and self.sign_scan(file):
elif file != self.pyas 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
while self.file_protect:
for action, file in win32file.ReadDirectoryChangesW(hDir,1024,True,win32con.FILE_NOTIFY_CHANGE_FILE_NAME|win32con.FILE_NOTIFY_CHANGE_DIR_NAME|win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES|win32con.FILE_NOTIFY_CHANGE_SIZE|win32con.FILE_NOTIFY_CHANGE_LAST_WRITE|win32con.FILE_NOTIFY_CHANGE_SECURITY,None,None):
for action, file in win32file.ReadDirectoryChangesW(hDir,1048576,True,win32con.FILE_NOTIFY_CHANGE_FILE_NAME|win32con.FILE_NOTIFY_CHANGE_DIR_NAME|win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES|win32con.FILE_NOTIFY_CHANGE_SIZE|win32con.FILE_NOTIFY_CHANGE_LAST_WRITE|win32con.FILE_NOTIFY_CHANGE_SECURITY,None,None):
try:
if action == 2 and str(f".{file.split('.')[-1]}").lower() in alist:
if self.ransom_block and "AppData" not in file:
full_path = str(f"C:/Users/{file}").replace("\\", "/")
file_type = str(f".{full_path.split('.')[-1]}").lower()
if action == 2 and "/AppData/" not in full_path and file_type in alist:
if self.ransom_block:
self.proc.kill()
self.ransom_block = False
self.send_notify(self.trans("勒索軟體攔截: ")+self.proc.name())
self.send_notify(self.trans("勒索軟體攔截: ")+self.proc.exe().replace("\\", "/"))
self.ransom_block = True
except:
pass
@@ -1227,12 +1228,12 @@ class MainWindow_Controller(QMainWindow):
with open(r"\\.\PhysicalDrive0", "r+b") as f:
if self.mbr_value[510:512] != b'\x55\xAA':
self.proc.kill()
self.send_notify(self.trans("惡意行為攔截: ")+self.proc.name())
self.send_notify(self.trans("惡意行為攔截: ")+self.proc.exe().replace("\\", "/"))
elif f.read(512) != self.mbr_value:
f.seek(0)
f.write(self.mbr_value)
self.proc.kill()
self.send_notify(self.trans("惡意行為攔截: ")+self.proc.name())
self.send_notify(self.trans("惡意行為攔截: ")+self.proc.exe().replace("\\", "/"))
except:
pass
@@ -1254,7 +1255,7 @@ class MainWindow_Controller(QMainWindow):
for conn in self.proc.connections():
if socket.gethostbyname(socket.gethostname()) == conn.laddr.ip:
self.proc.kill()
self.send_notify(self.trans("網路通訊攔截: ")+self.proc.name())
self.send_notify(self.trans("網路通訊攔截: ")+self.proc.exe().replace("\\", "/"))
except:
pass
BIN
View File
Binary file not shown.
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.2',
version='2.9.4',
company_name="PYAS Security",
file_description="Python Antivirus Software",
internal_name="PYAS",
+2 -2
View File
@@ -14,9 +14,9 @@ Windows 8.1, 10, 11 (64-bit), Ram 1GB, Rom 1GB or higher
psutil==5.9.5, pefile==2023.2.7, requests==2.31.0, pyperclip==1.8.2, pywin32==306, PyQt5==5.15.9
## Import Module
os, gc, sys, time, json, psutil, hashlib, pefile, socket, msvcrt, requests, pyperclip, win32file, win32gui, win32api, win32con, xml, PYAS_Scripts, PYAS_Function, PYAS_Extension, PYAS_Language, PYAS_Interface, threading, PyQt5
os, gc, sys, time, json, psutil, hashlib, pefile, socket, msvcrt, requests, pyperclip, win32file, win32gui, win32api, win32con, xml, PYAS_Function, PYAS_Function_Safe, PYAS_Extension, PYAS_Language, PYAS_Interface, threading, PyQt5
## Special Thanks
360, Wix, VirusShare, mtkiao129, LenStevens
360, Wix, VirusShare, mtkiao129, LenStevens, AV-T Team of LisectGroup
Copyright© 2020~2023 PYAS Security By 87owo