Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c6f9d6041 | ||
|
|
4a668499b0 | ||
|
|
f1057252b3 | ||
|
|
4e3c866536 | ||
|
|
c585cb370c | ||
|
|
2211a2b1d4 | ||
|
|
42069e2aac | ||
|
|
fd499a17fe | ||
|
|
0cc56d3da7 | ||
|
|
2096f55ce8 | ||
|
|
a4afe0ac10 | ||
|
|
d523b66970 | ||
|
|
192335249c | ||
|
|
e02879b3d7 | ||
|
|
bf7157fb3e | ||
|
|
7c2ae87c73 | ||
|
|
c1357bb2e1 | ||
|
|
c298c3773e | ||
|
|
7d09c6501c | ||
|
|
1a051d42af | ||
|
|
22bbcc5217 | ||
|
|
017f153002 |
No files matched your search
@@ -19,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.8.7"
|
||||
self.pyas_version = "2.8.8"
|
||||
self.ui = Ui_MainWindow()
|
||||
self.ui.setupUi(self)
|
||||
self.init_tray_icon()
|
||||
@@ -261,7 +261,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} ({len(function_list)})"))
|
||||
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("核心製作:"))
|
||||
@@ -628,11 +628,7 @@ 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])
|
||||
except:
|
||||
continue
|
||||
self.unlock_file(file)
|
||||
self.scan_file = True
|
||||
self.init_virus_list()
|
||||
self.ui.Virus_Scan_Solve_Button.hide()
|
||||
@@ -655,6 +651,20 @@ class MainWindow_Controller(QMainWindow):
|
||||
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()
|
||||
@@ -663,12 +673,10 @@ class MainWindow_Controller(QMainWindow):
|
||||
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()
|
||||
msvcrt.locking(self.virus_lock[file], msvcrt.LK_UNLCK, 0)
|
||||
os.close(self.virus_lock[file])
|
||||
self.unlock_file(file)
|
||||
os.remove(file)
|
||||
else:
|
||||
msvcrt.locking(self.virus_lock[file], msvcrt.LK_UNLCK, 0)
|
||||
os.close(self.virus_lock[file])
|
||||
self.unlock_file(file)
|
||||
except:
|
||||
continue
|
||||
self.init_state_safe()
|
||||
@@ -680,6 +688,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
|
||||
def write_scan(self, state, file):
|
||||
try:
|
||||
self.lock_file(file)
|
||||
self.virus_list.append(file)
|
||||
self.virus_list_ui.append(f"[{state}] {file}")
|
||||
item = QListWidgetItem()
|
||||
@@ -687,8 +696,6 @@ class MainWindow_Controller(QMainWindow):
|
||||
item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
|
||||
item.setCheckState(Qt.Checked)
|
||||
self.ui.Virus_Scan_output.addItem(item)
|
||||
self.virus_lock[file] = os.open(file, os.O_RDWR)
|
||||
msvcrt.locking(self.virus_lock[file], msvcrt.LK_NBLCK, 0)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
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",
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -1,7 +1,7 @@
|
||||
import pyinstaller_versionfile
|
||||
pyinstaller_versionfile.create_versionfile(
|
||||
output_file="versionfile.txt",
|
||||
version='2.8.7',
|
||||
version='2.8.8',
|
||||
company_name="PYAS Security",
|
||||
file_description="Python Antivirus Software",
|
||||
internal_name="PYAS",
|
||||
|
||||
Reference in new issue
Block a user