|
|
|
@@ -28,6 +28,7 @@ try:
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print('Error: '+str(e))
|
|
|
|
|
print('Loading mods: '+str(time.time()-start)+' sec')
|
|
|
|
|
#print(str(sys.argv))
|
|
|
|
|
|
|
|
|
|
def pyas_key():
|
|
|
|
|
start = time.time()
|
|
|
|
@@ -323,7 +324,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
_translate = QtCore.QCoreApplication.translate
|
|
|
|
|
if pyas_key():
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.1"))
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.2"))
|
|
|
|
|
now_time = datetime.datetime.now()
|
|
|
|
|
try:
|
|
|
|
|
ft = open('Library/PYAS/Temp/PYASP.tmp','r',encoding='utf-8')
|
|
|
|
@@ -334,7 +335,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.State_output.append(str(now_time.strftime('%Y/%m/%d %H:%M:%S')) + ' > [Tips] Real-time Protect is not enabled')
|
|
|
|
|
else:
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.1 (Security Key Error)"))
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.2 (Security Key Error)"))
|
|
|
|
|
now_time = datetime.datetime.now()
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.State_output.append(str(now_time.strftime('%Y/%m/%d %H:%M:%S')) + ' > [Warning] PYAS Security Key Error')
|
|
|
|
@@ -407,7 +408,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
self.ui.Encryption_Text_title.setText(_translate("MainWindow", "Before Encrypt & Decrypt"))
|
|
|
|
|
self.ui.Decrypt_Text_Run_Button.setText(_translate("MainWindow", "Encrypt"))
|
|
|
|
|
self.ui.About_Back.setText(_translate("MainWindow", "Back"))
|
|
|
|
|
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.4.1"))
|
|
|
|
|
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.4.2"))
|
|
|
|
|
self.ui.GUI_Made_title.setText(_translate("MainWindow", "GUI Make:"))
|
|
|
|
|
self.ui.GUI_Made_Name.setText(_translate("MainWindow", "mtkiao129#3921"))
|
|
|
|
|
self.ui.Core_Made_title.setText(_translate("MainWindow", "Core Make:"))
|
|
|
|
@@ -459,7 +460,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
_translate = QtCore.QCoreApplication.translate
|
|
|
|
|
if pyas_key():
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.1"))
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.2"))
|
|
|
|
|
now_time = datetime.datetime.now()
|
|
|
|
|
try:
|
|
|
|
|
ft = open('Library/PYAS/Temp/PYASP.tmp','r',encoding='utf-8')
|
|
|
|
@@ -470,7 +471,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.State_output.append(str(now_time.strftime('%Y/%m/%d %H:%M:%S')) + ' > [提示] 尚未启用实时防护')
|
|
|
|
|
else:
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.1 (安全密钥错误)"))
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.2 (安全密钥错误)"))
|
|
|
|
|
now_time = datetime.datetime.now()
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.State_output.append(str(now_time.strftime('%Y/%m/%d %H:%M:%S')) + ' > [警告] PYAS 安全密钥错误')
|
|
|
|
@@ -543,7 +544,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
self.ui.Encryption_Text_title.setText(_translate("MainWindow", "加密&解密前"))
|
|
|
|
|
self.ui.Decrypt_Text_Run_Button.setText(_translate("MainWindow", "解密"))
|
|
|
|
|
self.ui.About_Back.setText(_translate("MainWindow", "返回"))
|
|
|
|
|
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.4.1"))
|
|
|
|
|
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.4.2"))
|
|
|
|
|
self.ui.GUI_Made_title.setText(_translate("MainWindow", "介面制作:"))
|
|
|
|
|
self.ui.GUI_Made_Name.setText(_translate("MainWindow", "mtkiao129#3921"))
|
|
|
|
|
self.ui.Core_Made_title.setText(_translate("MainWindow", "核心制作:"))
|
|
|
|
@@ -595,7 +596,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
_translate = QtCore.QCoreApplication.translate
|
|
|
|
|
if pyas_key():
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.1"))
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.2"))
|
|
|
|
|
now_time = datetime.datetime.now()
|
|
|
|
|
try:
|
|
|
|
|
ft = open('Library/PYAS/Temp/PYASP.tmp','r',encoding='utf-8')
|
|
|
|
@@ -606,7 +607,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.State_output.append(str(now_time.strftime('%Y/%m/%d %H:%M:%S')) + ' > [提示] 尚未啟用實時防護')
|
|
|
|
|
else:
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.1 (安全密鑰錯誤)"))
|
|
|
|
|
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.4.2 (安全密鑰錯誤)"))
|
|
|
|
|
now_time = datetime.datetime.now()
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
self.ui.State_output.append(str(now_time.strftime('%Y/%m/%d %H:%M:%S')) + ' > [警告] PYAS 安全密鑰錯誤')
|
|
|
|
@@ -679,7 +680,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
self.ui.Encryption_Text_title.setText(_translate("MainWindow", "加密&解密前"))
|
|
|
|
|
self.ui.Decrypt_Text_Run_Button.setText(_translate("MainWindow", "解密"))
|
|
|
|
|
self.ui.About_Back.setText(_translate("MainWindow", "返回"))
|
|
|
|
|
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.4.1"))
|
|
|
|
|
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.4.2"))
|
|
|
|
|
self.ui.GUI_Made_title.setText(_translate("MainWindow", "介面製作:"))
|
|
|
|
|
self.ui.GUI_Made_Name.setText(_translate("MainWindow", "mtkiao129#3921"))
|
|
|
|
|
self.ui.Core_Made_title.setText(_translate("MainWindow", "核心製作:"))
|
|
|
|
@@ -1630,11 +1631,22 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
QMessageBox.critical(self,self.text_Translate('錯誤'),self.text_Translate("禁用失敗"),QMessageBox.Ok)
|
|
|
|
|
|
|
|
|
|
def System_Info_update(self):
|
|
|
|
|
self.ui.System_Info_View.setText('System information:'+'\n'+str(platform.platform())+'\n'+str(platform.architecture())+'\n'+str(platform.node())+'\n'+str(platform.processor()))
|
|
|
|
|
self.ui.System_Info_View.setText('System information:'+
|
|
|
|
|
'\nCore version: '+str(platform.platform())+
|
|
|
|
|
'\nMachine type: '+str(platform.machine())+
|
|
|
|
|
'\nSystem Info: '+str(platform.architecture())+
|
|
|
|
|
'\nComputer Name: '+str(platform.node())+
|
|
|
|
|
'\nProcessor Name'+str(platform.processor()))
|
|
|
|
|
|
|
|
|
|
def Delete_Private_File(self):
|
|
|
|
|
file, filetype= QFileDialog.getOpenFileName(self,self.text_Translate("刪除檔案"),"./",'')
|
|
|
|
|
if file !="":
|
|
|
|
|
if file =="":
|
|
|
|
|
pass
|
|
|
|
|
elif "PYAS.exe" in file:
|
|
|
|
|
QMessageBox.critical(self,"Error",self.text_Translate('存取被拒'),QMessageBox.Ok)
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
print(file)
|
|
|
|
|
question = QMessageBox.warning(self,self.text_Translate('刪除檔案'),self.text_Translate("您確定刪除該檔案嗎?"),QMessageBox.Yes|QMessageBox.No,QMessageBox.Yes)
|
|
|
|
|
if question == 16384:
|
|
|
|
|
try:
|
|
|
|
@@ -1984,6 +1996,9 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
QApplication.processEvents()
|
|
|
|
|
self.Virus_Scan = 0
|
|
|
|
|
self.pause = True
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
now_time = datetime.datetime.now()
|
|
|
|
|
self.ui.State_output.append(str(now_time.strftime('%Y/%m/%d %H:%M:%S')) + self.text_Translate(' > [提示] 尚未啟用實時防護'))
|
|
|
|
|
elif self.ui.Protection_switch_Button.text() == self.text_Translate("已开启"):
|
|
|
|
|
try:
|
|
|
|
|
os.remove('Library/PYAS/Temp/PYASP.tmp')
|
|
|
|
@@ -2006,6 +2021,9 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
QApplication.processEvents()
|
|
|
|
|
self.Virus_Scan = 0
|
|
|
|
|
self.pause = True
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
|
now_time = datetime.datetime.now()
|
|
|
|
|
self.ui.State_output.append(str(now_time.strftime('%Y/%m/%d %H:%M:%S')) + self.text_Translate(' > [提示] 尚未启用实时防护'))
|
|
|
|
|
else:
|
|
|
|
|
try:
|
|
|
|
|
self.ui.State_output.clear()
|
|
|
|
@@ -2085,6 +2103,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
else:
|
|
|
|
|
if self.pyas_scan_start(p.exe(),rfp):
|
|
|
|
|
of = subprocess.call('taskkill /f /im "'+str(p.name())+'" /t',shell=True)
|
|
|
|
|
vfile = str(p.exe())
|
|
|
|
|
try:
|
|
|
|
|
if of == 0:
|
|
|
|
|
self.ui.State_output.append(self.text_Translate('{} > [實時防護] 成功攔截了一個惡意軟體:').format(str(datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S')))+str(p.name()))
|
|
|
|
@@ -2109,7 +2128,7 @@ If you do not download from the official website, we cannot guarantee the securi
|
|
|
|
|
pass
|
|
|
|
|
print(str(e))
|
|
|
|
|
try:
|
|
|
|
|
os.remove(str(p.exe()))
|
|
|
|
|
os.remove(vfile)
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print('Error: '+str(e))
|
|
|
|
|
pass
|
|
|
|
|