Add files via upload

This commit is contained in:
PYDT authored and GitHub committed 2024-01-22 16:19:31 +08:00
1 parent 56cb95e523
commit 5925a80d3b
1 file changed
+2 -1
+2 -1
View File
@@ -1261,15 +1261,16 @@ class MainWindow_Controller(QMainWindow):
while self.mbr_protect and self.mbr_value:
try:
time.sleep(0.5)
file = self.proc.exe().replace("\\", "/")
with open(r"\\.\PhysicalDrive0", "r+b") as f:
if self.mbr_value[510:512] != b'\x55\xAA':
self.proc.kill()
file = self.proc.exe().replace("\\", "/")
self.send_notify(self.trans("惡意行為攔截: ")+file)
elif f.read(512) != self.mbr_value:
f.seek(0)
f.write(self.mbr_value)
self.proc.kill()
file = self.proc.exe().replace("\\", "/")
self.send_notify(self.trans("惡意行為攔截: ")+file)
except:
pass