Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acbcaa337e | ||
|
|
f4dbe57244 | ||
|
|
b494c64a2f | ||
|
|
321e086b95 | ||
|
|
fb60d6b867 | ||
|
|
8ff2e2074a | ||
|
|
1151a1c43f | ||
|
|
13bc6cecc4 | ||
|
|
a4ea572458 | ||
|
|
880df4dee9 | ||
|
|
b75e86dd11 | ||
|
|
75c84092ae | ||
|
|
c69db97da8 | ||
|
|
9c2a8892ae | ||
|
|
f92111563c | ||
|
|
0abb3e78cb | ||
|
|
fb83071419 | ||
|
|
f593c6df8b | ||
|
|
9b452b25c2 | ||
|
|
c835fcf99a | ||
|
|
e4373edc54 | ||
|
|
686c05785f | ||
|
|
994358a793 | ||
|
|
b02ca3757c | ||
|
|
164ec25415 | ||
|
|
8ee85cd9ca | ||
|
|
c07bf05754 | ||
|
|
2e2a08a765 | ||
|
|
10be5f442f | ||
|
|
0fcd8565d8 | ||
|
|
e07eee86dd | ||
|
|
f25d5d73c6 | ||
|
|
28b4d00d3c | ||
|
|
c75cf8a539 | ||
|
|
ff7199b857 | ||
|
|
5613fd81b7 | ||
|
|
c1458502f7 | ||
|
|
b2f620bd3d | ||
|
|
0e1030f186 | ||
|
|
ff4ffb8ec5 | ||
|
|
941458a381 | ||
|
|
560eb924b8 | ||
|
|
c3fab9e48b | ||
|
|
fc4dc74f9e | ||
|
|
35f0362910 | ||
|
|
27dfaa5f06 | ||
|
|
cf1866710a | ||
|
|
b3a5d06c4a | ||
|
|
7c904ff331 | ||
|
|
c7855a9dd1 | ||
|
|
5faee6a05f | ||
|
|
9213f9f54f | ||
|
|
c5e8351d76 | ||
|
|
e8e245ac0b | ||
|
|
2d8d6851d1 | ||
|
|
54f3e2ceda | ||
|
|
81d98917c3 | ||
|
|
8651f1e5d6 | ||
|
|
db1a26424d | ||
|
|
16405810dd | ||
|
|
f4f7fc1b0c | ||
|
|
e1145a743a | ||
|
|
6e5b54bbfe | ||
|
|
a948219e1a | ||
|
|
5675e926d5 | ||
|
|
cb7f8bbaab | ||
|
|
61e7fd8f40 | ||
|
|
76fab2671a | ||
|
|
dbc2bd2d62 | ||
|
|
73e62935ff | ||
|
|
c9e28b5482 | ||
|
|
6bf58eae4a | ||
|
|
3e09574b3c | ||
|
|
a7a00b9ca6 | ||
|
|
7a62e2df27 | ||
|
|
317f1ccae7 | ||
|
|
884631409a | ||
|
|
14dca5e2cb | ||
|
|
3a0b856d47 | ||
|
|
e66f8af022 | ||
|
|
13e4560d86 | ||
|
|
5ea789df7f | ||
|
|
debda9ec11 | ||
|
|
b3f126181b | ||
|
|
6bd110cae7 | ||
|
|
635f4ccde3 | ||
|
|
01da2685a5 | ||
|
|
b040aad8d1 | ||
|
|
84a0f08618 | ||
|
|
1f64c0d672 | ||
|
|
5bfff87e21 | ||
|
|
47db0e1c46 | ||
|
|
9a9fdc418f | ||
|
|
c30c89ed40 | ||
|
|
d7bb89968f | ||
|
|
f9b431d158 | ||
|
|
a1364896af | ||
|
|
2870a999a2 | ||
|
|
98646a6bd9 | ||
|
|
8ec894f576 | ||
|
|
254a67b9a8 | ||
|
|
eebfb79c27 | ||
|
|
1a1d7ec783 | ||
|
|
4482144b4d | ||
|
|
827279c9a8 | ||
|
|
b1d3488842 | ||
|
|
90112ae1ae | ||
|
|
1f4b9390b9 | ||
|
|
cc142aca40 | ||
|
|
89513b2c0d | ||
|
|
bfcd00acec | ||
|
|
9833b28a50 | ||
|
|
d0404dd29c | ||
|
|
9d3761e7f6 | ||
|
|
03515acc68 | ||
|
|
f8413f4cfb | ||
|
|
24f7f67e63 | ||
|
|
85129cdfe1 | ||
|
|
6d4f8b2731 | ||
|
|
24a0efcce1 | ||
|
|
ce6be1b4d5 | ||
|
|
723ac47c48 | ||
|
|
720d163bdb | ||
|
|
a74047d4e5 | ||
|
|
f6538f93c7 | ||
|
|
49cb0b3ef5 | ||
|
|
c81845ba3a | ||
|
|
053ae64008 | ||
|
|
48989840b8 | ||
|
|
36c7bcd87f | ||
|
|
a50eca1600 | ||
|
|
f70dc8eb46 | ||
|
|
f13d816c5b | ||
|
|
3429e658b6 | ||
|
|
0c6f9d6041 | ||
|
|
4a668499b0 | ||
|
|
f1057252b3 | ||
|
|
4e3c866536 | ||
|
|
c585cb370c | ||
|
|
2211a2b1d4 | ||
|
|
42069e2aac | ||
|
|
fd499a17fe | ||
|
|
0cc56d3da7 | ||
|
|
2096f55ce8 | ||
|
|
a4afe0ac10 | ||
|
|
d523b66970 | ||
|
|
192335249c | ||
|
|
e02879b3d7 | ||
|
|
bf7157fb3e | ||
|
|
7c2ae87c73 | ||
|
|
c1357bb2e1 | ||
|
|
c298c3773e | ||
|
|
7d09c6501c | ||
|
|
1a051d42af | ||
|
|
22bbcc5217 | ||
|
|
017f153002 | ||
|
|
cf4762ad04 | ||
|
|
6ba920e26a | ||
|
|
a66acf0ef9 | ||
|
|
8ab982ac38 | ||
|
|
0c32a126a9 | ||
|
|
fd47881f88 | ||
|
|
61298235fd | ||
|
|
4a38277c3e | ||
|
|
fd7912f631 | ||
|
|
4f1b0e99e4 | ||
|
|
086e375cea | ||
|
|
f90b132ccb | ||
|
|
f4bd217445 | ||
|
|
5524e2f689 | ||
|
|
42b8201f37 | ||
|
|
f71c821128 | ||
|
|
28330d3ad6 | ||
|
|
5afd576a3c | ||
|
|
edcf82d139 | ||
|
|
69e5143a27 | ||
|
|
215d0faa53 | ||
|
|
470142a640 | ||
|
|
8e67a8d679 | ||
|
|
be5baf9c87 | ||
|
|
7a05e42f3f | ||
|
|
34240ec01f | ||
|
|
0bf6eccb8b | ||
|
|
1f3b694231 | ||
|
|
470358585d | ||
|
|
4c69b555ae | ||
|
|
aef60afcd8 | ||
|
|
ec753c50a5 | ||
|
|
cbebe878aa | ||
|
|
e9d930507e | ||
|
|
3eba768d06 | ||
|
|
76a5732997 | ||
|
|
32987c1274 | ||
|
|
8990b97a32 | ||
|
|
65b427121f | ||
|
|
81dd259672 | ||
|
|
05c2031d47 | ||
|
|
2b2de7550f | ||
|
|
f9a8244086 | ||
|
|
86f3904b8a | ||
|
|
017aab4b0a | ||
|
|
e33777c961 | ||
|
|
ac14acd042 | ||
|
|
e9f07df010 | ||
|
|
5d3855cdfa | ||
|
|
938e76fb4a | ||
|
|
c0f6722c18 | ||
|
|
54e8922bc3 | ||
|
|
81b47dbf45 | ||
|
|
312401d80f | ||
|
|
8927ab7e36 | ||
|
|
6d99576e36 | ||
|
|
5618cd19cb | ||
|
|
da11c6f5b6 |
No files matched your search
@@ -1,9 +1,8 @@
|
||||
import os, gc, sys, time, json, psutil
|
||||
import subprocess, requests, msvcrt
|
||||
import hashlib, pefile, socket, msvcrt
|
||||
import requests, pyperclip, win32file
|
||||
import win32gui, win32api, win32con
|
||||
import hashlib, pefile, win32file
|
||||
import xml.etree.ElementTree as xmlet
|
||||
from PYAS_Scripts import scripts_list
|
||||
from PYAS_Function import function_list
|
||||
from PYAS_Extension import slist, alist
|
||||
from PYAS_Language import translate_dict
|
||||
@@ -19,16 +18,17 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.setAttribute(Qt.WA_TranslucentBackground)
|
||||
self.setWindowFlags(Qt.FramelessWindowHint)
|
||||
self.pyas = str(sys.argv[0]).replace("\\", "/")
|
||||
self.pyas_version = "2.8.4"
|
||||
self.pyas_version = "2.9.4"
|
||||
self.ui = Ui_MainWindow()
|
||||
self.ui.setupUi(self)
|
||||
self.init_tray_icon()
|
||||
self.init_virus_list()
|
||||
self.init_state_safe()
|
||||
self.init_config_path()
|
||||
self.init_config_read()
|
||||
self.init_config_json()
|
||||
self.init_config_list()
|
||||
self.init_config_boot()
|
||||
self.init_config_json()
|
||||
self.init_config_qtui()
|
||||
self.init_change_lang()
|
||||
self.init_control()
|
||||
@@ -40,7 +40,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.protect_file_init()
|
||||
self.protect_boot_init()
|
||||
self.protect_reg_init()
|
||||
self.protect_enh_init()
|
||||
self.protect_net_init()
|
||||
self.block_window_init()
|
||||
|
||||
def init_tray_icon(self):
|
||||
@@ -51,14 +51,14 @@ class MainWindow_Controller(QMainWindow):
|
||||
|
||||
def init_config_path(self):
|
||||
try:
|
||||
if not os.path.exists("C:/Windows/SysWOW64/PYAS"):
|
||||
os.makedirs("C:/Windows/SysWOW64/PYAS")
|
||||
if not os.path.exists("C:/ProgramData/PYAS"):
|
||||
os.makedirs("C:/ProgramData/PYAS")
|
||||
except Exception as e:
|
||||
self.bug_event(e)
|
||||
|
||||
def write_config(self, config):
|
||||
try:
|
||||
with open("C:/Windows/SysWOW64/PYAS/PYAS.json", "w", encoding="utf-8") as f:
|
||||
with open("C:/ProgramData/PYAS/PYAS.json", "w", encoding="utf-8") as f:
|
||||
f.write(json.dumps(config, indent=4, ensure_ascii=False))
|
||||
except:
|
||||
pass
|
||||
@@ -74,12 +74,12 @@ class MainWindow_Controller(QMainWindow):
|
||||
def init_config_list(self):
|
||||
try:
|
||||
self.whitelist = []
|
||||
if os.path.exists("C:/Windows/SysWOW64/PYAS/Whitelist.txt"):
|
||||
with open("C:/Windows/SysWOW64/PYAS/Whitelist.txt", "r", encoding="utf-8") as f:
|
||||
if os.path.exists("C:/ProgramData/PYAS/Whitelist.ini"):
|
||||
with open("C:/ProgramData/PYAS/Whitelist.ini", "r", encoding="utf-8") as f:
|
||||
self.whitelist = [line.strip() for line in f.readlines()]
|
||||
self.blocklist = []
|
||||
if os.path.exists("C:/Windows/SysWOW64/PYAS/Blocklist.txt"):
|
||||
with open("C:/Windows/SysWOW64/PYAS/Blocklist.txt", "r", encoding="utf-8") as f:
|
||||
if os.path.exists("C:/ProgramData/PYAS/Blocklist.ini"):
|
||||
with open("C:/ProgramData/PYAS/Blocklist.ini", "r", encoding="utf-8") as f:
|
||||
self.blocklist = [line.strip() for line in f.readlines()]
|
||||
except:
|
||||
pass
|
||||
@@ -93,11 +93,18 @@ class MainWindow_Controller(QMainWindow):
|
||||
except:
|
||||
self.mbr_value = False
|
||||
|
||||
def init_config_json(self):
|
||||
if not os.path.exists("C:/Windows/SysWOW64/PYAS/PYAS.json"):
|
||||
def init_config_read(self):
|
||||
try:
|
||||
if not os.path.exists("C:/ProgramData/PYAS/PYAS.json"):
|
||||
self.write_config({"language":"en_US","high_sensitivity":0,"cloud_services":1})
|
||||
with open("C:/ProgramData/PYAS/PYAS.json", "r", encoding="utf-8") as f:
|
||||
self.json = json.load(f)
|
||||
except:
|
||||
self.write_config({"language":"en_US","high_sensitivity":0,"cloud_services":1})
|
||||
with open("C:/Windows/SysWOW64/PYAS/PYAS.json", "r", encoding="utf-8") as f:
|
||||
self.json = json.load(f)
|
||||
with open("C:/ProgramData/PYAS/PYAS.json", "r", encoding="utf-8") as f:
|
||||
self.json = json.load(f)
|
||||
|
||||
def init_config_json(self):
|
||||
self.high_sensitivity = self.json.get("high_sensitivity", 0)
|
||||
if self.high_sensitivity == 1:
|
||||
self.ui.high_sensitivity_switch_Button.setText(self.trans("已開啟"))
|
||||
@@ -127,6 +134,8 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.ui.Tools_Button.clicked.connect(self.change_tools_widget)
|
||||
self.ui.Virus_Scan_Button.clicked.connect(self.change_scan_widget)
|
||||
self.ui.Protection_Button.clicked.connect(self.change_protect_widget)
|
||||
self.ui.Virus_Scan_output.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||
self.ui.Virus_Scan_output.customContextMenuRequested.connect(self.Virus_Scan_output_menu)
|
||||
self.ui.System_Process_Manage_Button.clicked.connect(lambda:self.change_tools(self.ui.Process_widget))
|
||||
self.ui.Process_Tools_Back.clicked.connect(lambda:self.back_to_tools(self.ui.Process_widget))
|
||||
self.ui.Virus_Scan_Solve_Button.clicked.connect(self.virus_solve)
|
||||
@@ -147,7 +156,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.ui.Protection_switch_Button_2.clicked.connect(self.protect_file_init)
|
||||
self.ui.Protection_switch_Button_3.clicked.connect(self.protect_boot_init)
|
||||
self.ui.Protection_switch_Button_4.clicked.connect(self.protect_reg_init)
|
||||
self.ui.Protection_switch_Button_5.clicked.connect(self.protect_enh_init)
|
||||
self.ui.Protection_switch_Button_5.clicked.connect(self.protect_net_init)
|
||||
self.ui.high_sensitivity_switch_Button.clicked.connect(self.change_sensitive)
|
||||
self.ui.cloud_services_switch_Button.clicked.connect(self.change_cloud_service)
|
||||
self.ui.Add_White_list_Button.clicked.connect(self.add_white_list)
|
||||
@@ -196,19 +205,19 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.ui.Process_widget.hide()
|
||||
self.ui.Setting_widget.hide()
|
||||
self.ui.About_widget.hide()
|
||||
self.ui.State_output.style().polish(self.ui.State_output.verticalScrollBar())
|
||||
self.ui.Virus_Scan_output.style().polish(self.ui.Virus_Scan_output.verticalScrollBar())
|
||||
|
||||
def init_change_lang(self):
|
||||
try:
|
||||
self.ui.State_output.clear()
|
||||
if self.ui.Language_Traditional_Chinese.isChecked():
|
||||
self.json["language"] = "zh_TW"
|
||||
self.write_config(self.json)
|
||||
elif self.ui.Language_Simplified_Chinese.isChecked():
|
||||
self.json["language"] = "zh_CN"
|
||||
self.write_config(self.json)
|
||||
else:
|
||||
elif self.ui.Language_English.isChecked():
|
||||
self.json["language"] = "en_US"
|
||||
self.write_config(self.json)
|
||||
self.write_config(self.json)
|
||||
self.init_lang_text()
|
||||
except Exception as e:
|
||||
self.bug_event(e)
|
||||
@@ -248,8 +257,8 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.ui.Protection_title_4.setText(self.trans("註冊表防護"))
|
||||
self.ui.Protection_illustrate_4.setText(self.trans("啟用此選項可以修復註冊表項目"))
|
||||
self.ui.Protection_switch_Button_4.setText(self.trans(self.ui.Protection_switch_Button_4.text()))
|
||||
self.ui.Protection_title_5.setText(self.trans("增強防護"))
|
||||
self.ui.Protection_illustrate_5.setText(self.trans("啟用此選項可以增強系統防護"))
|
||||
self.ui.Protection_title_5.setText(self.trans("網路防護"))
|
||||
self.ui.Protection_illustrate_5.setText(self.trans("啟用此選項可以監控網路通訊"))
|
||||
self.ui.Protection_switch_Button_5.setText(self.trans(self.ui.Protection_switch_Button_5.text()))
|
||||
self.ui.State_log.setText(self.trans("日誌:"))
|
||||
self.ui.More_Tools_Back_Button.setText(self.trans("工具>"))
|
||||
@@ -259,7 +268,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("核心製作:"))
|
||||
@@ -348,7 +357,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
widget.setAutoFillBackground(True)
|
||||
self.timer = QTimer()
|
||||
self.timer.timeout.connect(self.timeout)
|
||||
self.timer.start(0)
|
||||
self.timer.start(2)
|
||||
|
||||
def timeout(self):
|
||||
if self.opacity.i < 1:
|
||||
@@ -455,7 +464,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.timer.stop()
|
||||
x, y = event.x(), event.y()
|
||||
if event.button()==Qt.LeftButton and x >= 10 and x <= 841 and y >= 10 and y <= 49:
|
||||
self.m_flag=True
|
||||
self.m_flag = True
|
||||
self.m_Position=event.globalPos()-self.pos()
|
||||
event.accept()
|
||||
self.timer = QTimer()
|
||||
@@ -478,7 +487,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.setWindowOpacity(self.pyas_opacity/100)
|
||||
else:
|
||||
self.timer.stop()
|
||||
self.m_flag=False
|
||||
self.m_flag = False
|
||||
self.setCursor(QCursor(Qt.ArrowCursor))
|
||||
self.timer = QTimer()
|
||||
self.timer.timeout.connect(update_opacity)
|
||||
@@ -497,37 +506,46 @@ class MainWindow_Controller(QMainWindow):
|
||||
pat2.drawRoundedRect(rect, 1, 1)
|
||||
|
||||
def show_pyas_ui(self):
|
||||
def update_opacity():
|
||||
if self.pyas_opacity <= 100:
|
||||
self.pyas_opacity += 1
|
||||
self.setWindowOpacity(self.pyas_opacity/100)
|
||||
else:
|
||||
self.timer.stop()
|
||||
self.show()
|
||||
self.pyas_opacity = 0
|
||||
while self.pyas_opacity < 100:
|
||||
time.sleep(0.001)
|
||||
self.pyas_opacity += 1
|
||||
self.setWindowOpacity(self.pyas_opacity/100)
|
||||
QApplication.processEvents()
|
||||
self.timer = QTimer()
|
||||
self.timer.timeout.connect(update_opacity)
|
||||
self.timer.start(2)
|
||||
|
||||
def hide_pyas_ui(self):
|
||||
while self.pyas_opacity > 0:
|
||||
time.sleep(0.001)
|
||||
self.pyas_opacity -= 1
|
||||
self.setWindowOpacity(self.pyas_opacity/100)
|
||||
QApplication.processEvents()
|
||||
self.hide()
|
||||
def update_opacity():
|
||||
if self.pyas_opacity >= 0:
|
||||
self.pyas_opacity -= 1
|
||||
self.setWindowOpacity(self.pyas_opacity/100)
|
||||
else:
|
||||
self.timer.stop()
|
||||
self.hide()
|
||||
self.timer = QTimer()
|
||||
self.timer.timeout.connect(update_opacity)
|
||||
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:
|
||||
self.hide_pyas_ui()
|
||||
self.virus_scan_break()
|
||||
event.accept()
|
||||
else:
|
||||
event.ignore()
|
||||
|
||||
def bug_event(self, error):
|
||||
def bug_event(self, text):
|
||||
try:
|
||||
print(f"[Error] {error}")
|
||||
QMessageBox.critical(self,self.trans("錯誤"),error,QMessageBox.Ok)
|
||||
print(f"[Error] {text}")
|
||||
QMessageBox.critical(self,self.trans("錯誤"), text, QMessageBox.Ok)
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -619,52 +637,74 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.ui.Virus_Scan_text.setText(self.trans("正在初始化中"))
|
||||
QApplication.processEvents()
|
||||
for file in self.virus_list:
|
||||
try:
|
||||
msvcrt.locking(self.virus_lock[file], msvcrt.LK_UNLCK, 0)
|
||||
os.close(self.virus_lock[file])
|
||||
del self.virus_lock[file]
|
||||
except:
|
||||
continue
|
||||
self.unlock_file(file)
|
||||
self.scan_file = True
|
||||
self.init_virus_list()
|
||||
self.ui.Virus_Scan_Solve_Button.hide()
|
||||
self.ui.Virus_Scan_choose_widget.hide()
|
||||
self.ui.Virus_Scan_choose_Button.hide()
|
||||
self.ui.Virus_Scan_Break_Button.show()
|
||||
self.virus_list_output = QStringListModel()
|
||||
self.virus_list_output.setStringList(self.virus_list)
|
||||
self.ui.Virus_Scan_output.setModel(self.virus_list_output)
|
||||
self.ui.Virus_Scan_output.clear()
|
||||
except Exception as e:
|
||||
self.bug_event(e)
|
||||
|
||||
def Virus_Scan_output_menu(self, point):
|
||||
def copyPathFunc():
|
||||
item_row = False
|
||||
for i in self.ui.Virus_Scan_output.selectedIndexes():
|
||||
item_row = self.virus_list[i.row()]
|
||||
if item_row:
|
||||
pyperclip.copy(item_row)
|
||||
menu = QMenu()
|
||||
copyPath = menu.addAction(self.trans("複製路徑"))
|
||||
copyPath.triggered.connect(lambda: copyPathFunc())
|
||||
menu.exec_(self.ui.Virus_Scan_output.mapToGlobal(point))
|
||||
|
||||
def lock_file(self, file):
|
||||
try:
|
||||
self.virus_lock[file] = os.open(file, os.O_RDWR)
|
||||
msvcrt.locking(self.virus_lock[file], msvcrt.LK_NBLCK, 0)
|
||||
except:
|
||||
pass
|
||||
|
||||
def unlock_file(self, file):
|
||||
try:
|
||||
msvcrt.locking(self.virus_lock[file], msvcrt.LK_UNLCK, 0)
|
||||
os.close(self.virus_lock[file])
|
||||
except:
|
||||
pass
|
||||
|
||||
def virus_solve(self):
|
||||
try:
|
||||
self.ui.Virus_Scan_Solve_Button.hide()
|
||||
for file in self.virus_list:
|
||||
try:
|
||||
self.ui.Virus_Scan_text.setText(self.trans("正在刪除: ")+file)
|
||||
QApplication.processEvents()
|
||||
msvcrt.locking(self.virus_lock[file], msvcrt.LK_UNLCK, 0)
|
||||
os.close(self.virus_lock[file])
|
||||
os.remove(file)
|
||||
if self.ui.Virus_Scan_output.findItems(file, Qt.MatchContains)[0].checkState() == Qt.Checked:
|
||||
self.ui.Virus_Scan_text.setText(self.trans("正在刪除: ")+file)
|
||||
QApplication.processEvents()
|
||||
self.unlock_file(file)
|
||||
os.remove(file)
|
||||
else:
|
||||
self.unlock_file(file)
|
||||
except:
|
||||
continue
|
||||
self.init_state_safe()
|
||||
self.init_virus_list()
|
||||
self.virus_list_output.setStringList(self.virus_list)
|
||||
self.ui.Virus_Scan_output.setModel(self.virus_list_output)
|
||||
self.ui.Virus_Scan_output.clear()
|
||||
self.ui.Virus_Scan_text.setText(self.trans("成功: 刪除成功"))
|
||||
except Exception as e:
|
||||
self.bug_event(e)
|
||||
|
||||
def write_scan(self, state, file):
|
||||
try:
|
||||
self.lock_file(file)
|
||||
self.virus_list.append(file)
|
||||
self.virus_list_ui.append(f"[{state}] {file}")
|
||||
self.virus_list_output.setStringList(self.virus_list_ui)
|
||||
self.ui.Virus_Scan_output.setModel(self.virus_list_output)
|
||||
self.virus_lock[file] = os.open(file, os.O_RDWR)
|
||||
msvcrt.locking(self.virus_lock[file], msvcrt.LK_NBLCK, 0)
|
||||
item = QListWidgetItem()
|
||||
item.setText(f"[{state}] {file}")
|
||||
item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
|
||||
item.setCheckState(Qt.Checked)
|
||||
self.ui.Virus_Scan_output.addItem(item)
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -702,7 +742,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
def file_scan(self):
|
||||
try:
|
||||
file = str(QFileDialog.getOpenFileName(self,self.trans("病毒掃描"),"C:/")[0])
|
||||
if file and file != self.pyas:
|
||||
if file and file not in self.whitelist:
|
||||
self.init_scan()
|
||||
self.start_scan(file)
|
||||
self.answer_scan()
|
||||
@@ -735,20 +775,16 @@ class MainWindow_Controller(QMainWindow):
|
||||
def start_scan(self, file):
|
||||
try:
|
||||
file_type = str(f".{file.split('.')[-1]}").lower()
|
||||
if self.high_sensitivity == 1:
|
||||
if self.high_sensitivity and file != self.pyas:
|
||||
if self.api_scan(file):
|
||||
self.write_scan(self.trans("惡意"),file)
|
||||
elif self.pe_scan(file):
|
||||
self.write_scan(self.trans("可疑"),file)
|
||||
elif self.scr_scan(file):
|
||||
self.write_scan(self.trans("可疑"),file)
|
||||
elif file_type in slist and self.sign_scan(file):
|
||||
if self.api_scan(file):
|
||||
self.write_scan(self.trans("惡意"),file)
|
||||
elif self.pe_scan(file):
|
||||
self.write_scan(self.trans("可疑"),file)
|
||||
elif self.scr_scan(file):
|
||||
self.write_scan(self.trans("可疑"),file)
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -757,18 +793,18 @@ class MainWindow_Controller(QMainWindow):
|
||||
try:
|
||||
file = str(os.path.join(path,fd)).replace("\\", "/")
|
||||
if self.scan_file == False:
|
||||
return
|
||||
elif file in self.whitelist or ":/Windows" in file:
|
||||
break
|
||||
elif ":/Windows" in file:
|
||||
continue
|
||||
elif os.path.isdir(file):
|
||||
self.traverse_path(file)
|
||||
elif file != self.pyas:
|
||||
elif file not in self.whitelist:
|
||||
self.ui.Virus_Scan_text.setText(self.trans(f"正在掃描: ")+file)
|
||||
QApplication.processEvents()
|
||||
self.start_scan(file)
|
||||
gc.collect()
|
||||
gc.collect()
|
||||
except:
|
||||
continue
|
||||
pass
|
||||
|
||||
def api_scan(self, file):
|
||||
try:
|
||||
@@ -778,6 +814,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
strBody = f'-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="md5s"\r\n\r\n{text}\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="format"\r\n\r\nXML\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="product"\r\n\r\n360zip\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="combo"\r\n\r\n360zip_main\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="v"\r\n\r\n2\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="osver"\r\n\r\n5.1\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="vk"\r\n\r\na03bc211\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="mid"\r\n\r\n8a40d9eff408a78fe9ec10a0e7e60f62\r\n-------------------------------7d83e2d7a141e--'
|
||||
response = requests.post('http://qup.f.360.cn/file_health_info.php', data=strBody, timeout=3)
|
||||
return response.status_code == 200 and float(xmlet.fromstring(response.text).find('.//e_level').text) > 50
|
||||
return False
|
||||
except:
|
||||
return False
|
||||
|
||||
@@ -788,15 +825,6 @@ class MainWindow_Controller(QMainWindow):
|
||||
except:
|
||||
return True
|
||||
|
||||
def scr_scan(self, text):
|
||||
try:
|
||||
if os.path.isfile(text):
|
||||
with open(text, "r", encoding="utf-8") as f:
|
||||
text = f.read()
|
||||
return any(sn in text for sn in scripts_list)
|
||||
except:
|
||||
return False
|
||||
|
||||
def pe_scan(self, file):
|
||||
try:
|
||||
fn = []
|
||||
@@ -807,7 +835,14 @@ class MainWindow_Controller(QMainWindow):
|
||||
fn.append(str(func.name, "utf-8"))
|
||||
except:
|
||||
pass
|
||||
return fn in function_list
|
||||
for vfl in function_list:
|
||||
QApplication.processEvents()
|
||||
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
|
||||
|
||||
@@ -815,7 +850,6 @@ class MainWindow_Controller(QMainWindow):
|
||||
try:
|
||||
if QMessageBox.warning(self,self.trans("警告"),self.trans("您確定要修復系統檔案嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
|
||||
self.repair_system_wallpaper()
|
||||
self.repair_system_explorer()
|
||||
self.repair_system_restrict()
|
||||
self.repair_system_file_type()
|
||||
self.repair_system_file_icon()
|
||||
@@ -831,14 +865,14 @@ class MainWindow_Controller(QMainWindow):
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
key = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\exefile', 0, win32con.KEY_ALL_ACCESS)
|
||||
key = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE, r'SOFTWARE\Classes\exefile', 0, win32con.KEY_ALL_ACCESS)
|
||||
win32api.RegSetValue(key, 'DefaultIcon', win32con.REG_SZ, '%1')
|
||||
except:
|
||||
pass
|
||||
|
||||
def repair_system_image(self):
|
||||
try:
|
||||
key = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options',0,win32con.KEY_ALL_ACCESS | win32con.WRITE_OWNER)
|
||||
key = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options',0,win32con.KEY_ALL_ACCESS | win32con.WRITE_OWNER)
|
||||
count = win32api.RegQueryInfoKey(key)[0]
|
||||
while count >= 0:
|
||||
try:
|
||||
@@ -853,11 +887,11 @@ class MainWindow_Controller(QMainWindow):
|
||||
def repair_system_file_type(self):
|
||||
try:
|
||||
data = [('.exe', 'exefile'),('exefile', 'Application')]
|
||||
key = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes', 0, win32con.KEY_ALL_ACCESS)
|
||||
key = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE, r'SOFTWARE\Classes', 0, win32con.KEY_ALL_ACCESS)
|
||||
for ext, value in data:
|
||||
win32api.RegSetValue(key, ext, win32con.REG_SZ, value)
|
||||
win32api.RegCloseKey(key)
|
||||
key = win32api.RegOpenKey(win32con.HKEY_CURRENT_USER, 'SOFTWARE\Classes', 0, win32con.KEY_ALL_ACCESS)
|
||||
key = win32api.RegOpenKey(win32con.HKEY_CURRENT_USER, r'SOFTWARE\Classes', 0, win32con.KEY_ALL_ACCESS)
|
||||
for ext, value in data:
|
||||
try:
|
||||
win32api.RegSetValue(key, ext, win32con.REG_SZ, value)
|
||||
@@ -867,7 +901,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
except:
|
||||
pass
|
||||
win32api.RegCloseKey(key)
|
||||
key = win32api.RegOpenKey(win32con.HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts', 0, win32con.KEY_ALL_ACCESS)
|
||||
key = win32api.RegOpenKey(win32con.HKEY_CURRENT_USER, r'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts', 0, win32con.KEY_ALL_ACCESS)
|
||||
win32api.RegSetValue(key, '.exe', win32con.REG_SZ, '')
|
||||
win32api.RegCloseKey(key)
|
||||
key = win32api.RegOpenKey(win32con.HKEY_CLASSES_ROOT, None, 0, win32con.KEY_ALL_ACCESS)
|
||||
@@ -892,27 +926,29 @@ class MainWindow_Controller(QMainWindow):
|
||||
"NoFavoritesMenu", "NoRecentDocsHistory", "NoSetTaskbar", "NoSMHelp", "NoTrayContextMenu", "NoViewContextMenu", "NoWindowsUpdate",
|
||||
"NoWinKeys", "StartMenuLogOff", "NoSimpleNetlDList", "NoLowDiskSpaceChecks", "DisableLockWorkstation", "NoManageMyComputerVerb",
|
||||
"DisableTaskMgr", "DisableRegistryTools", "DisableChangePassword", "Wallpaper", "NoComponents", "NoAddingComponents", "Restrict_Run"]
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"Explorer")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"Explorer")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"System")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"System")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"ActiveDesktop")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"SOFTWARE\Policies\Microsoft\Windows",0,win32con.KEY_ALL_ACCESS),"System")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,"SOFTWARE\Policies\Microsoft\Windows",0,win32con.KEY_ALL_ACCESS),"System")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"Software\Policies\Microsoft",0,win32con.KEY_ALL_ACCESS),"MMC")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"Software\Policies\Microsoft\MMC",0,win32con.KEY_ALL_ACCESS),"{8FC0B734-A0E1-11D1-A7D3-0000F87571E3}")
|
||||
keys = [win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"SOFTWARE\Policies\Microsoft\Windows\System",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,"SOFTWARE\Policies\Microsoft\Windows\System",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,"Software\Policies\Microsoft\MMC\{8FC0B734-A0E1-11D1-A7D3-0000F87571E3}",0,win32con.KEY_ALL_ACCESS)]
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"Explorer")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"Explorer")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"System")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"System")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",0,win32con.KEY_ALL_ACCESS),"ActiveDesktop")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"SOFTWARE\Policies\Microsoft\Windows",0,win32con.KEY_ALL_ACCESS),"System")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,r"SOFTWARE\Policies\Microsoft\Windows",0,win32con.KEY_ALL_ACCESS),"System")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"Software\Policies\Microsoft",0,win32con.KEY_ALL_ACCESS),"MMC")
|
||||
win32api.RegCreateKey(win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"Software\Policies\Microsoft\MMC",0,win32con.KEY_ALL_ACCESS),"{8FC0B734-A0E1-11D1-A7D3-0000F87571E3}")
|
||||
keys = [win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"SOFTWARE\Policies\Microsoft\Windows\System",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,r"SOFTWARE\Policies\Microsoft\Windows\System",0,win32con.KEY_ALL_ACCESS),
|
||||
win32api.RegOpenKey(win32con.HKEY_CURRENT_USER,r"Software\Policies\Microsoft\MMC\{8FC0B734-A0E1-11D1-A7D3-0000F87571E3}",0,win32con.KEY_ALL_ACCESS)]
|
||||
for key in keys:
|
||||
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)
|
||||
@@ -921,26 +957,13 @@ class MainWindow_Controller(QMainWindow):
|
||||
|
||||
def repair_system_wallpaper(self):
|
||||
try:
|
||||
key = win32api.RegOpenKeyEx(win32con.HKEY_CURRENT_USER, "Control Panel\\Desktop", 0, win32con.KEY_SET_VALUE)
|
||||
key = win32api.RegOpenKeyEx(win32con.HKEY_CURRENT_USER, r"Control Panel\Desktop", 0, win32con.KEY_SET_VALUE)
|
||||
win32api.RegSetValueEx(key, "Wallpaper", 0, win32con.REG_SZ, 'C:/Windows/web/wallpaper/windows/img0.jpg')
|
||||
win32api.RegCloseKey(key)
|
||||
win32gui.SystemParametersInfo(win32con.SPI_SETDESKWALLPAPER, 'C:/Windows/web/wallpaper/windows/img0.jpg', win32con.SPIF_SENDCHANGE)
|
||||
except:
|
||||
pass
|
||||
|
||||
def repair_system_explorer(self):
|
||||
try:
|
||||
if not self.is_process_running("explorer.exe"):
|
||||
subprocess.run("explorer.exe", check=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
def is_process_running(self, name):
|
||||
for proc in psutil.process_iter():
|
||||
if p.name() == name:
|
||||
return True
|
||||
return False
|
||||
|
||||
def clean_system(self):
|
||||
try:
|
||||
if QMessageBox.warning(self,self.trans("警告"),self.trans("您確定要清理系統垃圾嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
|
||||
@@ -972,12 +995,12 @@ class MainWindow_Controller(QMainWindow):
|
||||
if file and file not in self.whitelist:
|
||||
if QMessageBox.warning(self,self.trans("警告"),self.trans("您確定要增加到白名單嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
|
||||
self.whitelist.append(file)
|
||||
with open("C:/Windows/SysWOW64/PYAS/Whitelist.txt", "a+", encoding="utf-8") as f:
|
||||
with open("C:/ProgramData/PYAS/Whitelist.ini", "a+", encoding="utf-8") as f:
|
||||
f.write(f"{file}\n")
|
||||
QMessageBox.information(self,self.trans("成功"),self.trans(f"成功增加到白名單: ")+file,QMessageBox.Ok)
|
||||
elif file and QMessageBox.warning(self,self.trans("警告"),self.trans("您確定要取消增加到白名單嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
|
||||
self.whitelist.remove(file)
|
||||
with open("C:/Windows/SysWOW64/PYAS/Whitelist.txt", "w", encoding="utf-8") as f:
|
||||
with open("C:/ProgramData/PYAS/Whitelist.ini", "w", encoding="utf-8") as f:
|
||||
for white_file in self.whitelist:
|
||||
f.write(f'{white_file}\n')
|
||||
QMessageBox.information(self,self.trans("成功"),self.trans(f"成功取消增加到白名單: ")+file,QMessageBox.Ok)
|
||||
@@ -995,12 +1018,12 @@ class MainWindow_Controller(QMainWindow):
|
||||
if window_name not in self.blocklist:
|
||||
if QMessageBox.warning(self,self.trans("警告"),self.trans(f"您確定要攔截 {window_name} 嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
|
||||
self.blocklist.append(window_name)
|
||||
with open("C:/Windows/SysWOW64/PYAS/Blocklist.txt", "a+", encoding="utf-8") as f:
|
||||
with open("C:/ProgramData/PYAS/Blocklist.ini", "a+", encoding="utf-8") as f:
|
||||
f.write(f'{window_name}\n')
|
||||
QMessageBox.information(self,self.trans("成功"),self.trans(f"成功增加到彈窗攔截: ")+window_name,QMessageBox.Ok)
|
||||
elif QMessageBox.warning(self,self.trans("警告"),self.trans(f"您確定要取消攔截 {window_name} 嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
|
||||
self.blocklist.remove(window_name)
|
||||
with open("C:/Windows/SysWOW64/PYAS/Blocklist.txt", "w", encoding="utf-8") as f:
|
||||
with open("C:/ProgramData/PYAS/Blocklist.ini", "w", encoding="utf-8") as f:
|
||||
for block_name in self.blocklist:
|
||||
f.write(f'{block_name}\n')
|
||||
QMessageBox.information(self,self.trans("成功"),self.trans(f"成功取消彈窗攔截: ")+window_name,QMessageBox.Ok)
|
||||
@@ -1016,18 +1039,18 @@ class MainWindow_Controller(QMainWindow):
|
||||
def block_software_window(self):
|
||||
while self.block_window:
|
||||
try:
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
for window_name in self.blocklist:
|
||||
win32gui.PostMessage(win32gui.FindWindow(None, window_name), win32con.WM_SYSCOMMAND, win32con.SC_CLOSE, 0)
|
||||
win32gui.PostMessage(win32gui.FindWindow(None, window_name), 274, 61536, 0)
|
||||
except:
|
||||
pass
|
||||
|
||||
def repair_network(self):
|
||||
try:
|
||||
if QMessageBox.warning(self,self.trans("警告"),self.trans("您確定要修復系統網路嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
|
||||
subprocess.run("netsh winsock reset", check=True)
|
||||
os.system("netsh winsock reset")
|
||||
if QMessageBox.warning(self,self.trans("警告"),self.trans("使用此選項需要重啟,您確定要重啟嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
|
||||
subprocess.run("shutdown -r -t 0", check=True)
|
||||
os.system("shutdown -r -t 0")
|
||||
except Exception as e:
|
||||
self.bug_event(e)
|
||||
|
||||
@@ -1129,19 +1152,20 @@ class MainWindow_Controller(QMainWindow):
|
||||
QPushButton:hover{background-color:rgba(20,200,20,120);}""")
|
||||
Thread(target=self.protect_reg_thread, daemon=True).start()
|
||||
|
||||
def protect_enh_init(self):
|
||||
def protect_net_init(self):
|
||||
if self.ui.Protection_switch_Button_5.text() == self.trans("已開啟"):
|
||||
self.enh_protect = False
|
||||
self.net_protect = False
|
||||
self.ui.Protection_switch_Button_5.setText(self.trans("已關閉"))
|
||||
self.ui.Protection_switch_Button_5.setStyleSheet("""
|
||||
QPushButton{border:none;background-color:rgba(20,20,20,30);border-radius: 15px;}
|
||||
QPushButton:hover{background-color:rgba(20,20,20,50);}""")
|
||||
else:
|
||||
self.enh_protect = True
|
||||
self.net_protect = True
|
||||
self.ui.Protection_switch_Button_5.setText(self.trans("已開啟"))
|
||||
self.ui.Protection_switch_Button_5.setStyleSheet("""
|
||||
QPushButton{border:none;background-color:rgba(20,200,20,100);border-radius: 15px;}
|
||||
QPushButton:hover{background-color:rgba(20,200,20,120);}""")
|
||||
Thread(target=self.protect_net_thread, daemon=True).start()
|
||||
|
||||
def protect_proc_thread(self):
|
||||
existing_processes = set()
|
||||
@@ -1149,31 +1173,33 @@ class MainWindow_Controller(QMainWindow):
|
||||
if p.pid not in existing_processes:
|
||||
existing_processes.add(p.pid)
|
||||
while self.proc_protect:
|
||||
time.sleep(0.1)
|
||||
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)
|
||||
name, file, cmd = p.name(), p.exe().replace("\\", "/"), p.cmdline()
|
||||
if ":/Windows" in file and self.enh_protect:
|
||||
if "powershell" in name and self.api_scan(cmd[-1].split("'")[-2]):
|
||||
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 self.api_scan(cmd[-1]) or self.scr_scan(cmd):
|
||||
p.kill()
|
||||
self.send_notify(self.trans("惡意軟體攔截: ")+name)
|
||||
elif ":/Program" in file and self.enh_protect:
|
||||
psutil.Process(p.pid).suspend()
|
||||
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("惡意軟體攔截: ")+name)
|
||||
elif file != self.pyas and file not in self.whitelist:
|
||||
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 file != self.pyas and self.sign_scan(file):
|
||||
self.proc = p
|
||||
if self.api_scan(file) or self.pe_scan(file):
|
||||
p.kill()
|
||||
self.send_notify(self.trans("惡意軟體攔截: ")+name)
|
||||
psutil.Process(p.pid).resume()
|
||||
gc.collect()
|
||||
except:
|
||||
pass
|
||||
@@ -1182,49 +1208,54 @@ class MainWindow_Controller(QMainWindow):
|
||||
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 and "AppData" not in file:
|
||||
if action == 1 and str(f".{file.split('.')[-2]}").lower() in alist:
|
||||
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.send_notify(self.trans("勒索軟體攔截: ")+self.proc.name())
|
||||
elif action == 2 and str(f".{file.split('.')[-1]}").lower() in alist:
|
||||
if self.ransom_block:
|
||||
self.proc.kill()
|
||||
self.ransom_block = False
|
||||
self.send_notify(self.trans("勒索軟體攔截: ")+self.proc.name())
|
||||
else:
|
||||
self.ransom_block = True
|
||||
gc.collect()
|
||||
self.ransom_block = False
|
||||
self.send_notify(self.trans("勒索軟體攔截: ")+self.proc.exe().replace("\\", "/"))
|
||||
self.ransom_block = True
|
||||
except:
|
||||
pass
|
||||
|
||||
def protect_boot_thread(self):
|
||||
while self.mbr_protect and self.mbr_value:
|
||||
try:
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
with open(r"\\.\PhysicalDrive0", "r+b") as f:
|
||||
if self.mbr_value[510:512] == b'\x55\xAA':
|
||||
if 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())
|
||||
else:
|
||||
if self.mbr_value[510:512] != b'\x55\xAA':
|
||||
self.proc.kill()
|
||||
self.send_notify(self.trans("惡意行為攔截: ")+self.proc.name())
|
||||
self.init_config_boot()
|
||||
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.exe().replace("\\", "/"))
|
||||
except:
|
||||
pass
|
||||
|
||||
def protect_reg_thread(self):
|
||||
while self.reg_protect:
|
||||
try:
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.5)
|
||||
self.repair_system_image()
|
||||
self.repair_system_restrict()
|
||||
self.repair_system_file_type()
|
||||
self.repair_system_file_icon()
|
||||
self.repair_system_image()
|
||||
except:
|
||||
pass
|
||||
|
||||
def protect_net_thread(self):
|
||||
while self.net_protect:
|
||||
try:
|
||||
time.sleep(0.5)
|
||||
for conn in self.proc.connections():
|
||||
if socket.gethostbyname(socket.gethostname()) == conn.laddr.ip:
|
||||
self.proc.kill()
|
||||
self.send_notify(self.trans("網路通訊攔截: ")+self.proc.exe().replace("\\", "/"))
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
+3
-2
@@ -1,9 +1,10 @@
|
||||
slist = [".exe",".dll",".com",".msi",".scr",
|
||||
".bat",".cmd",".ps1",".vbs",".js"]
|
||||
".bat",".cmd",".ps1",".vbs",".jar",
|
||||
".js",".elf",".doc",".xls",".xlsx"]
|
||||
|
||||
alist = [".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",
|
||||
".zip",".7z",".rar",".exe",".dll"]
|
||||
".zip",".7z",".rar",".tar",".gz"]
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
function_list = [['LoadLibraryA', 'GetProcAddress', 'SetUnhandledExceptionFilter', 'GetCurrentProcess', 'TerminateProcess', 'IsProcessorFeaturePresent', 'QueryPerformanceCounter', 'GetCurrentProcessId', 'GetCurrentThreadId', 'GetSystemTimeAsFileTime', 'InitializeSListHead', 'IsDebuggerPresent', 'GetModuleHandleW', 'UnhandledExceptionFilter', 'GetDC', '?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ', '?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z', '?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ', '?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z', '??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ', '?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ', '?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z', '?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ', '?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ', '?unshift@?$codecvt@DDU_Mbstatet@@@std@@QBEHAAU_Mbstatet@@PAD1AAPAD@Z', '?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z', '?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ', '?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z', '??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ', '??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z', '?in@?$codecvt@DDU_Mbstatet@@@std@@QBEHAAU_Mbstatet@@PBD1AAPBDPAD3AAPAD@Z', '?out@?$codecvt@DDU_Mbstatet@@@std@@QBEHAAU_Mbstatet@@PBD1AAPBDPAD3AAPAD@Z', '?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ', '?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ', '?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ', '?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ', '?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z', '?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ', '?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ', '?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ', '?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBE_JXZ', '?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z', '?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ', '?_Getcat@?$codecvt@DDU_Mbstatet@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z', '?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z', '?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ', '??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ', '?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE_JXZ', '?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE_JPAD_J@Z', '?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE_JPBD_J@Z', '??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ', '??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z', '??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ', '?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PAD_J@Z', '?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@_JH@Z', '?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@U_Mbstatet@@@2@XZ', '?width@ios_base@std@@QAE_J_J@Z', '?width@ios_base@std@@QBE_JXZ', '?flags@ios_base@std@@QBEHXZ', '?good@ios_base@std@@QBE_NXZ', '?always_noconv@codecvt_base@std@@QBE_NXZ', '??Bid@locale@std@@QAEIXZ', '?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPBD_J@Z', '??1_Lockit@std@@QAE@XZ', '??0_Lockit@std@@QAE@H@Z', '?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A', '?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ', '?uncaught_exception@std@@YA_NXZ', '?_Xout_of_range@std@@YAXPBD@Z', '?id@?$codecvt@DDU_Mbstatet@@@std@@2V0locale@2@A', '?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z', '?_Xlength_error@std@@YAXPBD@Z', '?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBE_JXZ', '_CxxThrowException', '__current_exception_context', '__std_exception_copy', '__std_exception_destroy', '__CxxFrameHandler3', 'memcpy', '__current_exception', 'memset', '_except_handler4_common', 'memmove', '_fseeki64', '__p__commode', 'fsetpos', 'ungetc', 'setvbuf', 'fgetpos', 'fwrite', '_set_fmode', '_get_stream_buffer_pointers', '__stdio_common_vfprintf', 'fgetc', 'fclose', 'fflush', '__acrt_iob_func', 'fputc', 'fread', '_lock_file', '_unlock_file', 'exit', '_exit', '_configure_narrow_argv', '__p___argc', '_initterm_e', '_cexit', '_c_exit', '_register_thread_local_exe_atexit_callback', '_initterm', '_set_app_type', '_get_initial_narrow_environment', '_seh_filter_exe', '_initialize_onexit_table', '_register_onexit_function', '_crt_atexit', '_controlfp_s', 'terminate', '_initialize_narrow_environment', '_invalid_parameter_noinfo_noreturn', '__p___argv', 'free', '_set_new_mode', 'malloc', '_callnewh', '__setusermatherr', '_configthreadlocale'], ['GetCurrentProcess', 'FindNextFileA', 'FindClose', 'GetSystemDirectoryA', 'DeleteFileA', 'SetFileAttributesA', 'ExitProcess', 'FLine truncated
|
||||
+51
-27
@@ -584,30 +584,6 @@ class Ui_MainWindow(object):
|
||||
self.Virus_Scan_choose_Button.setDefault(False)
|
||||
self.Virus_Scan_choose_Button.setFlat(False)
|
||||
self.Virus_Scan_choose_Button.setObjectName("Virus_Scan_choose_Button")
|
||||
self.Virus_Scan_output = QtWidgets.QListView(self.Virus_Scan_widget)
|
||||
self.Virus_Scan_output.setEnabled(True)
|
||||
self.Virus_Scan_output.setGeometry(QtCore.QRect(45, 150, 581, 301))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.Virus_Scan_output.setFont(font)
|
||||
self.Virus_Scan_output.setStyleSheet("QWidget::item\n"
|
||||
"{\n"
|
||||
"background-color: rgba(50,50,50,30);\n"
|
||||
"color:black;\n"
|
||||
"border: transparent;\n"
|
||||
"border-bottom: 1px solid #dbdbdb;\n"
|
||||
"padding: 5px;\n"
|
||||
"}\n"
|
||||
"QWidget::item:hover\n"
|
||||
"{\n"
|
||||
"background-color: rgba(50,50,50,40);\n"
|
||||
"}\n"
|
||||
"QListView\n"
|
||||
"{\n"
|
||||
"outline: none;\n"
|
||||
"}")
|
||||
self.Virus_Scan_output.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
self.Virus_Scan_output.setObjectName("Virus_Scan_output")
|
||||
self.Virus_Scan_choose_widget = QtWidgets.QWidget(self.Virus_Scan_widget)
|
||||
self.Virus_Scan_choose_widget.setGeometry(QtCore.QRect(480, 67, 141, 31))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||
@@ -785,6 +761,45 @@ class Ui_MainWindow(object):
|
||||
self.Virus_Scan_Break_Button.setDefault(False)
|
||||
self.Virus_Scan_Break_Button.setFlat(False)
|
||||
self.Virus_Scan_Break_Button.setObjectName("Virus_Scan_Break_Button")
|
||||
self.Virus_Scan_output = QtWidgets.QListWidget(self.Virus_Scan_widget)
|
||||
self.Virus_Scan_output.setGeometry(QtCore.QRect(45, 150, 581, 301))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Microsoft YaHei")
|
||||
font.setPointSize(9)
|
||||
self.Virus_Scan_output.setFont(font)
|
||||
self.Virus_Scan_output.setStyleSheet("QWidget::item\n"
|
||||
"{\n"
|
||||
"background-color: rgba(50,50,50,30);\n"
|
||||
"color:black;\n"
|
||||
"border: transparent;\n"
|
||||
"border-bottom: 1px solid #dbdbdb;\n"
|
||||
"padding: 5px;\n"
|
||||
"}\n"
|
||||
"QWidget::item:hover\n"
|
||||
"{\n"
|
||||
"background-color: rgba(50,50,50,40);\n"
|
||||
"}\n"
|
||||
"QListView\n"
|
||||
"{\n"
|
||||
"outline: none;\n"
|
||||
"}")
|
||||
self.Virus_Scan_output.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
self.Virus_Scan_output.setTabKeyNavigation(False)
|
||||
self.Virus_Scan_output.setProperty("showDropIndicator", True)
|
||||
self.Virus_Scan_output.setDefaultDropAction(QtCore.Qt.CopyAction)
|
||||
self.Virus_Scan_output.setAlternatingRowColors(False)
|
||||
self.Virus_Scan_output.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
|
||||
self.Virus_Scan_output.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectItems)
|
||||
self.Virus_Scan_output.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerItem)
|
||||
self.Virus_Scan_output.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerItem)
|
||||
self.Virus_Scan_output.setMovement(QtWidgets.QListView.Static)
|
||||
self.Virus_Scan_output.setProperty("isWrapping", False)
|
||||
self.Virus_Scan_output.setResizeMode(QtWidgets.QListView.Fixed)
|
||||
self.Virus_Scan_output.setLayoutMode(QtWidgets.QListView.SinglePass)
|
||||
self.Virus_Scan_output.setViewMode(QtWidgets.QListView.ListMode)
|
||||
self.Virus_Scan_output.setUniformItemSizes(False)
|
||||
self.Virus_Scan_output.setSelectionRectVisible(False)
|
||||
self.Virus_Scan_output.setObjectName("Virus_Scan_output")
|
||||
self.State_widget = QtWidgets.QWidget(self.widget)
|
||||
self.State_widget.setGeometry(QtCore.QRect(170, 49, 671, 481))
|
||||
font = QtGui.QFont()
|
||||
@@ -808,7 +823,7 @@ class Ui_MainWindow(object):
|
||||
self.State_title.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.State_title.setObjectName("State_title")
|
||||
self.State_icon = QtWidgets.QLabel(self.State_widget)
|
||||
self.State_icon.setGeometry(QtCore.QRect(250, 20, 171, 171))
|
||||
self.State_icon.setGeometry(QtCore.QRect(250, 30, 171, 171))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Microsoft YaHei")
|
||||
font.setPointSize(1)
|
||||
@@ -836,6 +851,9 @@ class Ui_MainWindow(object):
|
||||
font.setKerning(True)
|
||||
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
|
||||
self.State_output.setFont(font)
|
||||
self.State_output.setAutoFillBackground(False)
|
||||
self.State_output.setStyleSheet("")
|
||||
self.State_output.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored)
|
||||
self.State_output.setUndoRedoEnabled(True)
|
||||
self.State_output.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
|
||||
self.State_output.setObjectName("State_output")
|
||||
@@ -1746,7 +1764,7 @@ class Ui_MainWindow(object):
|
||||
self.Language_Choose_widget_2.setFont(font)
|
||||
self.Language_Choose_widget_2.setObjectName("Language_Choose_widget_2")
|
||||
self.gridLayoutWidget_2 = QtWidgets.QWidget(self.Language_Choose_widget_2)
|
||||
self.gridLayoutWidget_2.setGeometry(QtCore.QRect(0, 0, 381, 61))
|
||||
self.gridLayoutWidget_2.setGeometry(QtCore.QRect(0, 0, 381, 65))
|
||||
self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2")
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.gridLayoutWidget_2)
|
||||
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
|
||||
@@ -1801,6 +1819,7 @@ class Ui_MainWindow(object):
|
||||
self.Theme_illustrate.raise_()
|
||||
self.Language_Choose_widget_2.raise_()
|
||||
self.Theme_title.raise_()
|
||||
self.Protection_widget.raise_()
|
||||
self.Setting_widget.raise_()
|
||||
self.About_widget.raise_()
|
||||
self.Tools_widget.raise_()
|
||||
@@ -1809,7 +1828,6 @@ class Ui_MainWindow(object):
|
||||
self.Virus_Scan_widget.raise_()
|
||||
self.Window_widget.raise_()
|
||||
self.Navigation_Bar.raise_()
|
||||
self.Protection_widget.raise_()
|
||||
self.State_widget.raise_()
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
|
||||
@@ -1846,7 +1864,13 @@ class Ui_MainWindow(object):
|
||||
self.Disk_Scan_Button.setText(_translate("MainWindow", "全盤掃描"))
|
||||
self.Virus_Scan_Solve_Button.setText(_translate("MainWindow", "立即解決"))
|
||||
self.Virus_Scan_Break_Button.setText(_translate("MainWindow", "停止掃描"))
|
||||
self.Virus_Scan_output.setSortingEnabled(False)
|
||||
self.State_title.setText(_translate("MainWindow", "This Device Has Been Protect"))
|
||||
self.State_output.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||
"p, li { white-space: pre-wrap; }\n"
|
||||
"</style></head><body style=\" font-family:\'Microsoft YaHei\'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
|
||||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
|
||||
self.State_log.setText(_translate("MainWindow", "日誌:"))
|
||||
self.About_Back.setText(_translate("MainWindow", "返回"))
|
||||
self.PYAS_Version.setText(_translate("MainWindow", "PYAS v2.3.5"))
|
||||
|
||||
+17
-16
@@ -3,17 +3,18 @@ translate_dict = {"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On"
|
||||
"軟體":"软件","檔案":"文件","確定":"确认","設定":"设置","關於":"关于",
|
||||
"錯誤":"错误","實時":"实时","發現":"发现","關閉":"关闭","裝置":"设备",
|
||||
"總數":"总数","註冊":"注册","圖標":"图标","路徑":"路径","網路":"网络",
|
||||
"位元":"字节","彈窗":"弹窗","靈敏":"敏感","誤報":"误报","簽":"签",
|
||||
"項":"项","掃":"扫","試":"试","黃":"黄","嗎":"吗","防":"保","鑰":"钥",
|
||||
"當":"当","後":"后","護":"护","導":"导","區":"区","復":"复","攔":"拦",
|
||||
"請":"请","統":"统","刪":"删","進":"进","個":"个","選":"选","啟":"启",
|
||||
"監":"监","並":"并","徑":"径","盤":"盘","隱":"隐","動":"动","狀":"状",
|
||||
"誌":"志","這":"这","會":"会","題":"题","擇":"择","語":"语","無":"无",
|
||||
"顯":"显","變":"变","戶":"户","碼":"码","雲":"云","訂":"订","稱":"称",
|
||||
"類":"类","輸":"输","執":"执","數":"数","尋":"寻","網":"网","詢":"询",
|
||||
"製":"制","員":"员","許":"许","條":"条","藍":"蓝","紅":"红","綠":"绿",
|
||||
"態":"态","務":"务","連":"连","檢":"检","測":"测","關":"关","強":"强",
|
||||
"驅":"驱","為":"为","腳":"脚","增":"增","單":"单","開":"开","惡":"恶"},
|
||||
"位元":"字节","彈窗":"弹窗","靈敏":"敏感","誤報":"误报","複製":"复制",
|
||||
"訊":"讯","項":"项","掃":"扫","試":"试","黃":"黄","嗎":"吗","防":"保",
|
||||
"鑰":"钥","當":"当","後":"后","護":"护","導":"导","區":"区","復":"复",
|
||||
"攔":"拦","請":"请","統":"统","刪":"删","進":"进","個":"个","選":"选",
|
||||
"啟":"启","監":"监","並":"并","徑":"径","盤":"盘","隱":"隐","動":"动",
|
||||
"狀":"状","誌":"志","這":"这","會":"会","題":"题","擇":"择","語":"语",
|
||||
"無":"无","顯":"显","變":"变","戶":"户","碼":"码","雲":"云","訂":"订",
|
||||
"稱":"称","類":"类","輸":"输","執":"执","數":"数","尋":"寻","網":"网",
|
||||
"詢":"询","製":"制","員":"员","許":"许","條":"条","藍":"蓝","紅":"红",
|
||||
"綠":"绿","態":"态","務":"务","連":"连","檢":"检","測":"测","關":"关",
|
||||
"強":"强","驅":"驱","為":"为","腳":"脚","增":"增","單":"单","開":"开",
|
||||
"惡":"恶",},
|
||||
"en_US": {"已開啟":"On","已關閉":"Off","已开启":"On","已关闭":"Off",",":", ",
|
||||
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website",
|
||||
"惡意檔案":"Virus ","惡意軟體":"Malware ","勒索軟體":"Ransom ",
|
||||
@@ -24,7 +25,7 @@ translate_dict = {"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On"
|
||||
"確定要":"Sure Want To ","靈敏度":"Sensitivity ","更新":"Update",
|
||||
"白色主題":"White","黑色主題":"Black","黃色主題":"Yellow","紅色主題":"Red",
|
||||
"藍色主題":"Blue","綠色主題":"Green","語言":"Language ","製作":"Make",
|
||||
"測試人員":"Testers","版本資訊":"Information","無效簽名":"Unsign ",
|
||||
"測試人員":"Testers","版本資訊":"Information","通訊":"Communication ",
|
||||
"註冊表":"Registry ","退出":"Quit ","檔案":"File ","當前":"Currently ",
|
||||
"狀態":"State ","掃描":"Scan ","工具":"Tools ","防護":"Protect ",
|
||||
"失敗":"Failed ","請":"Please ","路徑":"Path ","方式":"Method ",
|
||||
@@ -43,10 +44,10 @@ translate_dict = {"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On"
|
||||
"管理":"Manage","所有":"All ","全盤":"Full ","取消":"Cancel ",
|
||||
"垃圾":"Junk ","位元":"byte ","本機":"Computer ","停止":"Stop ",
|
||||
"增加到":"Add File To ","白名單":"White List ","軟體":"Software ",
|
||||
"增加":"Add","移除":"Delete","項目":"Items ","生成":"Create ",
|
||||
"增加":"Add","移除":"Delete","項目":"Items ","生成":"Create ","稱":"",
|
||||
"開啟":"Open ","您":"You ","此":"This ","並":"And ","未":"Not ",
|
||||
"高":"High ","新":"New ","和":"And ","可能會":"Possible ","會":"Can ",
|
||||
"日誌":"Log","已":"Has ","彈窗":"Window ","要":"To ","驅動":"Drive ",
|
||||
"的":"","顯示":"","個":"","嗎":"","中":"","了":"","行":"","稱":"",
|
||||
"密鑰":"Key ","檢測":"Detect ","誤報":"False Positive ","立即":"",
|
||||
" ":" "}}
|
||||
"的":"","顯示":"","個":"","嗎":"","中":"","了":"","行":"","立即":"",
|
||||
"密鑰":"Key ","檢測":"Detect ","誤報":"False Positive "," ":" ",
|
||||
"複製":"Copy "}}
|
||||
@@ -1 +0,0 @@
|
||||
scripts_list = ["%0|%0","ExclusionPath","cmdkey","eiculwo"]
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
import pyinstaller_versionfile
|
||||
pyinstaller_versionfile.create_versionfile(
|
||||
output_file="versionfile.txt",
|
||||
version='2.8.4',
|
||||
version='2.9.4',
|
||||
company_name="PYAS Security",
|
||||
file_description="Python Antivirus Software",
|
||||
internal_name="PYAS",
|
||||
legal_copyright="© PYAS Security",
|
||||
legal_copyright="PYAS Security",
|
||||
original_filename="PYAS.exe",
|
||||
product_name="PYAS")
|
||||
@@ -1,9 +1,8 @@
|
||||
# PYAS (Python Antivirus Software)
|
||||

|
||||

|
||||
|
||||
## Official Website
|
||||
https://pyantivirus.wixsite.com/pyas ,
|
||||
https://github.com/87owo/PYAS
|
||||
https://pyantivirus.wixsite.com/pyas , https://github.com/87owo/PYAS
|
||||
|
||||
## MIT License
|
||||
https://github.com/87owo/PYAS/blob/main/LICENSE.md
|
||||
@@ -11,10 +10,13 @@ https://github.com/87owo/PYAS/blob/main/LICENSE.md
|
||||
## Support System
|
||||
Windows 8.1, 10, 11 (64-bit), Ram 1GB, Rom 1GB or higher
|
||||
|
||||
## Requirements
|
||||
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, requests, psutil, ctypes, pywin32, subprocess, xml, hashlib, pefile, PyQt5, threading, PYAS_Language, PYAS_Scripts, PYAS_Function, PYAS_Extension, PYAS_Interface
|
||||
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
|
||||
Reference in new issue
Block a user