Compare commits

...
13 Commits
Author SHA1 Message Date
87owo 8501aa319d Add files via upload 2022-09-07 18:24:47 +08:00
87owo 89d59c1b75 Update README.md 2022-09-07 07:19:16 +08:00
87owo cb40e6bc89 Update README.md 2022-09-06 16:42:47 +08:00
87owo c5471ebca7 Update README.md 2022-09-06 16:41:19 +08:00
87owo 456885000e Update README.md 2022-09-06 16:34:03 +08:00
87owo 03a9b6336b Update README.md 2022-09-06 16:31:01 +08:00
87owo c01a93635f Update README.md 2022-09-06 16:28:41 +08:00
87owo 5b9fe1ac1c Update README.md 2022-09-06 16:27:09 +08:00
87owo cb205164a8 Update README.md 2022-09-06 16:22:40 +08:00
87owo 0ac5eb8840 Update README.md 2022-09-06 16:21:35 +08:00
87owo 0ed0b38ea9 Update README.md 2022-09-06 16:18:50 +08:00
87owo e6c2d4521f Update README.md 2022-09-06 16:14:50 +08:00
87owo 7e4c038354 Add files via upload 2022-09-04 11:38:15 +08:00
6 changed files with 385 additions and 170 deletions

No files matched your search

+349 -163
View File
@@ -31,13 +31,22 @@ def pyas_key():
bytes = f.read()
readable_hash = md5(bytes).hexdigest();
f.close()
ft = open('Library/PYAS/Setup/PYAS.key','r')
fe = ft.read()
ft.close()
if fe == readable_hash:
return True
else:
return False
try:
ft = open('Library/PYAS/Setup/PYAS.key','r')
fe = ft.read()
ft.close()
if fe == readable_hash:
return True
else:
return False
except:
ft = open('C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.key','r')
fe = ft.read()
ft.close()
if fe == readable_hash:
return True
else:
return False
except:
return False
@@ -147,13 +156,19 @@ class MainWindow_Controller(QtWidgets.QMainWindow):
self.pause = False
self.ini_config = configparser.RawConfigParser()
try:
self.ini_config.read(r"./Library/PYAS/Setup/PYAS.ini")
try:
self.ini_config.read(r"./Library/PYAS/Setup/PYAS.ini")
except:
self.ini_config.read(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini")
except:
try:
with open(r"./Library/PYAS/Setup/PYAS.ini",mode="w",encoding="utf-8") as file:
file.write("[Setting]\nhigh_sensitivity = 0\nlanguage = english")
file.close()
except:
pass
with open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini",mode="w",encoding="utf-8") as file:
file.write("[Setting]\nhigh_sensitivity = 0\nlanguage = english")
file.close()
try:
if self.ini_config.get("Setting","language") == "zh_TW":
self.language = "zh_TW"
@@ -171,8 +186,11 @@ class MainWindow_Controller(QtWidgets.QMainWindow):
try:
with open(r"./Library/PYAS/Setup/PYAS.ini",mode="w",encoding="utf-8") as file:
file.write("[Setting]\nhigh_sensitivity = 0\nlanguage = english")
file.close()
except:
pass
with open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini",mode="w",encoding="utf-8") as file:
file.write("[Setting]\nhigh_sensitivity = 0\nlanguage = english")
file.close()
self.language = "english"
self.lang_init_en()
self.ui.Languahe_English.setChecked(True)
@@ -212,7 +230,7 @@ class MainWindow_Controller(QtWidgets.QMainWindow):
self.show_virus_scan_progress_bar = 0
except:
self.show_virus_scan_progress_bar = 0
self.ui.License_terms.setText('''PYAS Antivirus Software Security License Terms V2.0
self.ui.License_terms.setText('''PYAS Python Antivirus Software Security License Terms V2.0
=====================================================
#Use of PYAS antivirus software and services means that you accept these terms, if you do not accept, please do not use PYAS services.
=====================================================
@@ -275,9 +293,9 @@ 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.3.6"))
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.9"))
else:
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.6 (Security Key Error)"))
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.9 (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')
@@ -350,7 +368,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.3.6"))
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.3.9"))
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:"))
@@ -359,8 +377,11 @@ If you do not download from the official website, we cannot guarantee the securi
self.ui.Testers_Name.setText(_translate("MainWindow", "mtkiao129#3921, PYAS_Dev#0629"))
self.ui.PYAS_URL_title.setText(_translate("MainWindow", "Website:"))
self.ui.PYAS_URL.setText(_translate("MainWindow", "<html><head/><body><p><a href=\"https://pyantivirus.wixsite.com/pyas\"><span style= \" text-decoration: underline; color:#0000ff;\">https://pyantivirus.wixsite.com/pyas</span></a></p></body></html>"))
self.ui.PYAS_CopyRight.setText(_translate("MainWindow", "Copyright© 2020-2022 PYAS Security"))
self.ui.PYAE_Version.setText(_translate("MainWindow", "PYAE V1.2.6"))
cy = datetime.datetime.now().strftime('%Y')
if int(cy) < 2020:
cy = str('2020')
self.ui.PYAS_CopyRight.setText(_translate("MainWindow", "Copyright© 2020-"+str(cy)+" PYAS Security"))
self.ui.PYAE_Version.setText(_translate("MainWindow", "PYAE V1.2.7"))
self.ui.Change_Users_Password_Back.setText(_translate("MainWindow", "Back"))
self.ui.Change_Users_Password_New_Password_title.setText(_translate("MainWindow", "New password:"))
self.ui.Change_Users_Password_User_Name_title.setText(_translate("MainWindow", "Username:"))
@@ -397,9 +418,9 @@ 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.3.6"))
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.9"))
else:
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.6 (安全密钥错误)"))
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.9 (安全密钥错误)"))
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 安全密钥错误')
@@ -472,7 +493,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.3.6"))
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.3.9"))
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", "核心制作:"))
@@ -481,8 +502,11 @@ If you do not download from the official website, we cannot guarantee the securi
self.ui.Testers_Name.setText(_translate("MainWindow", "mtkiao129#3921, PYAS_Dev#0629"))
self.ui.PYAS_URL_title.setText(_translate("MainWindow", "官方网站:"))
self.ui.PYAS_URL.setText(_translate("MainWindow", "<html><head/><body><p><a href=\"https://pyantivirus.wixsite.com/pyas\"><span style=\" text-decoration: underline; color:#0000ff;\">https://pyantivirus.wixsite.com/pyas</span></a></p></body></html>"))
self.ui.PYAS_CopyRight.setText(_translate("MainWindow", "Copyright© 2020-2022 PYAS Security"))
self.ui.PYAE_Version.setText(_translate("MainWindow", "PYAE V1.2.6"))
cy = datetime.datetime.now().strftime('%Y')
if int(cy) < 2020:
cy = str('2020')
self.ui.PYAS_CopyRight.setText(_translate("MainWindow", "Copyright© 2020-"+str(cy)+" PYAS Security"))
self.ui.PYAE_Version.setText(_translate("MainWindow", "PYAE V1.2.7"))
self.ui.Change_Users_Password_Back.setText(_translate("MainWindow", "返回"))
self.ui.Change_Users_Password_New_Password_title.setText(_translate("MainWindow", "新密码:"))
self.ui.Change_Users_Password_User_Name_title.setText(_translate("MainWindow", "用户名:"))
@@ -520,9 +544,9 @@ 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.3.6"))
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.9"))
else:
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.6 (安全密鑰錯誤)"))
self.ui.Window_title.setText(_translate("MainWindow", "PYAS V2.3.9 (安全密鑰錯誤)"))
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 安全密鑰錯誤')
@@ -595,7 +619,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.3.6"))
self.ui.PYAS_Version.setText(_translate("MainWindow", "PYAS V2.3.9"))
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", "核心製作:"))
@@ -604,8 +628,11 @@ If you do not download from the official website, we cannot guarantee the securi
self.ui.Testers_Name.setText(_translate("MainWindow", "mtkiao129#3921, PYAS_Dev#0629"))
self.ui.PYAS_URL_title.setText(_translate("MainWindow", "官方網站:"))
self.ui.PYAS_URL.setText(_translate("MainWindow", "<html><head/><body><p><a href=\"https://pyantivirus.wixsite.com/pyas\"><span style=\" text-decoration: underline; color:#0000ff;\">https://pyantivirus.wixsite.com/pyas</span></a></p></body></html>"))
self.ui.PYAS_CopyRight.setText(_translate("MainWindow", "Copyright© 2020-2022 PYAS Security"))
self.ui.PYAE_Version.setText(_translate("MainWindow", "PYAE V1.2.6"))
cy = datetime.datetime.now().strftime('%Y')
if int(cy) < 2020:
cy = str('2020')
self.ui.PYAS_CopyRight.setText(_translate("MainWindow", "Copyright© 2020-"+str(cy)+" PYAS Security"))
self.ui.PYAE_Version.setText(_translate("MainWindow", "PYAE V1.2.7"))
self.ui.Change_Users_Password_Back.setText(_translate("MainWindow", "返回"))
self.ui.Change_Users_Password_New_Password_title.setText(_translate("MainWindow", "新密碼:"))
self.ui.Change_Users_Password_User_Name_title.setText(_translate("MainWindow", "用戶名:"))
@@ -858,15 +885,19 @@ If you do not download from the official website, we cannot guarantee the securi
def Virus_Solve(self):
try:
for line in self.Virus_List:
if 'C:/Windows' not in line:
if 'C:/Windows' in str(line):
pass
elif 'C:/Program' in str(file):
pass
elif 'AppData' in str(file):
pass
else:
self.ui.Virus_Scan_text.setText('Deleting:'+str(line))
QApplication.processEvents()
try:
os.remove(str(line))
except:
continue
else:
pass
self.ui.Virus_Scan_text.setText(self.text_Translate('✔成功: 已執行成功。'))
self.ui.Virus_Scan_Solve_Button.hide()
self.ui.State_icon.setPixmap(QtGui.QPixmap(":/icon/Icon/check.png"))
@@ -902,7 +933,7 @@ If you do not download from the official website, we cannot guarantee the securi
with open(file,"rb") as f:
bytes = f.read()
readable_hash = md5(bytes).hexdigest()
if str(readable_hash)[:8] in str(rfp):
if str(readable_hash)[:10] in str(rfp):
virus_found = True
f.close()
if not virus_found:
@@ -914,18 +945,35 @@ If you do not download from the official website, we cannot guarantee the securi
#定義紀錄掃描
def pyas_scan_write_en(self,file):
try:
ft = open('Library/PYAS/Temp/PYASV.tmp','a',encoding='utf-8')
self.Virus_List.append(file)
fe = ft.write(file+'\n')
ft.close()
if 'C:/Windows' in str(file):
pass
elif 'C:/Program' in str(file):
pass
elif 'AppData' in str(file):
pass
else:
try:
ft = open('Library/PYAS/Temp/PYASV.tmp','a',encoding='utf-8')
self.Virus_List.append(file)
fe = ft.write(file+'\n')
ft.close()
except:
ft = open('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASV.tmp','a',encoding='utf-8')
self.Virus_List.append(file)
fe = ft.write(file+'\n')
ft.close()
except:
pass
#定義讀取紀錄
def pyas_scan_read_en(self):
try:
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
ft.close()
try:
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
ft.close()
except:
ft = open('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
ft.close()
try:
pygame.mixer.init()
if not pygame.mixer.music.get_busy():
@@ -948,10 +996,16 @@ If you do not download from the official website, we cannot guarantee the securi
except Exception as e:
print(e)
try:
pygame.mixer.init()
if not pygame.mixer.music.get_busy():
pygame.mixer.music.load('./Library/PYAS/Audio/Complete.ogg')
pygame.mixer.music.play()
try:
pygame.mixer.init()
if not pygame.mixer.music.get_busy():
pygame.mixer.music.load('./Library/PYAS/Audio/Complete.ogg')
pygame.mixer.music.play()
except:
pygame.mixer.init()
if not pygame.mixer.music.get_busy():
pygame.mixer.music.load('C:/Program Files (x86)/PYAS/Library/PYAS/Audio/Complete.ogg')
pygame.mixer.music.play()
except:
pass
self.ui.Virus_Scan_Break_Button.hide()
@@ -963,22 +1017,33 @@ If you do not download from the official website, we cannot guarantee the securi
#定義移除紀錄
def pyas_scan_del_en(self):
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
except:
os.remove('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASV.tmp')
except:
pass
def pyas_scan_answer_en(self):
self.ui.Virus_Scan_text.setText(self.pyas_scan_read_en())
try:
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
self.lines = ft.readlines()
ft.close()
try:
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
self.lines = ft.readlines()
ft.close()
except:
ft = open('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
self.lines = ft.readlines()
ft.close()
except Exception as e:
print(e)
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
except:
os.remove('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASV.tmp')
except:
pass
pass
def pyas_scan_path_en(self,path,rfp,rfn,fts):
try:
@@ -1031,7 +1096,10 @@ If you do not download from the official website, we cannot guarantee the securi
self.ui.Virus_Scan_output.setModel(self.Virus_List_output)
file, filetype= QFileDialog.getOpenFileName(self,self.text_Translate("病毒掃描"),"./",'')
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
except:
os.remove('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASV.tmp')
except:
pass
if file != "":
@@ -1040,10 +1108,16 @@ If you do not download from the official website, we cannot guarantee the securi
self.Virus_Scan = 1
self.ui.Virus_Scan_choose_Button.hide()
QApplication.processEvents()
with open('Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
with open('Library/PYAE/Function/Viruslist.func','r') as fn:
rfn = fn.read()
try:
with open('Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
with open('Library/PYAE/Function/Viruslist.func','r') as fn:
rfn = fn.read()
except:
with open('C:/Program Files (x86)/PYAS/Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
with open('C:/Program Files (x86)/PYAS/Library/PYAE/Function/Viruslist.func','r') as fn:
rfn = fn.read()
if self.pyas_scan_start(file,rfp):
self.pyas_scan_write_en(file)
self.ui.Virus_Scan_text.setText(self.text_Translate("✖當前已發現惡意軟體。"))
@@ -1075,14 +1149,20 @@ If you do not download from the official website, we cannot guarantee the securi
self.ui.Virus_Scan_Solve_Button.hide()
self.ui.Virus_Scan_ProgressBar.hide()
self.ini_config = configparser.RawConfigParser()
self.ini_config.read(r"./Library/PYAS/Setup/PYAS.ini")
try:
self.ini_config.read(r"./Library/PYAS/Setup/PYAS.ini")
except:
self.ini_config.read(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini")
self.Virus_List = []
self.Virus_List_output=QStringListModel()
self.Virus_List_output.setStringList(self.Virus_List)
self.ui.Virus_Scan_output.setModel(self.Virus_List_output)
file = QFileDialog.getExistingDirectory(self,self.text_Translate("病毒掃描"),"./")
file = QFileDialog.getExistingDirectory(self,self.text_Translate("病毒掃描"),"./")
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
except:
os.remove('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASV.tmp')
except:
pass
if file != "":
@@ -1096,10 +1176,16 @@ If you do not download from the official website, we cannot guarantee the securi
#self.quantity = 0
#self.ui.Virus_Scan_ProgressBar.setMaximum(len(self.list_allfile(file,[])))
#self.ui.Virus_Scan_ProgressBar.show()
with open('Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
with open('Library/PYAE/Function/Viruslist.func','r') as fn:
rfn = fn.read()
try:
with open('Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
with open('Library/PYAE/Function/Viruslist.func','r') as fn:
rfn = fn.read()
except:
with open('C:/Program Files (x86)/PYAS/Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
with open('C:/Program Files (x86)/PYAS/Library/PYAE/Function/Viruslist.func','r') as fn:
rfn = fn.read()
fp.close()
fn.close()
self.pyas_scan_path_en(file,rfp,rfn,0)
@@ -1122,14 +1208,21 @@ If you do not download from the official website, we cannot guarantee the securi
self.ui.Virus_Scan_output.setModel(self.Virus_List_output)
self.scaning = self.text_Translate("正在掃描:")
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
try:
os.remove('Library/PYAS/Temp/PYASV.tmp')
except:
os.remove('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASV.tmp')
except:
pass
try:
self.ui.Virus_Scan_text.setText(self.text_Translate("正在初始化中,請稍後..."))
QApplication.processEvents()
with open('Library/PYAE/Hashes/Viruslist.md5','r') as self.fp:
rfp = self.fp.read()
try:
with open('Library/PYAE/Hashes/Viruslist.md5','r') as self.fp:
rfp = self.fp.read()
except:
with open('C:/Program Files (x86)/PYAS/Library/PYAE/Hashes/Viruslist.md5','r') as self.fp:
rfp = self.fp.read()
self.pyas_scan_disk_en('A:/',rfp)
self.pyas_scan_disk_en('B:/',rfp)
self.pyas_scan_disk_en('C:/',rfp)
@@ -1169,71 +1262,78 @@ If you do not download from the official website, we cannot guarantee the securi
if os.path.isdir(fullpath):
self.pyas_scan_disk_en(fullpath,rfp)
else:
if self.Virus_Scan == 0:
self.ui.Virus_Scan_Break_Button.hide()
break
elif '.exe' in str(fd) or '.EXE' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.cmd' in str(fd) or '.CMD' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.bat' in str(fd) or '.BAT' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.com' in str(fd) or '.COM' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.vbs' in str(fd) or '.VBS' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.js' in str(fd) or '.JS' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.xls' in str(fd) or '.XLS' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.doc' in str(fd) or '.DOC' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.dll' in str(fd) or '.DLL' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.scr' in str(fd) or '.SCR' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
#elif '.zip' in str(fd) or '.ZIP' in str(fd):
#self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
#QApplication.processEvents()
#if self.pyas_scan_start(fullpath,rfp):
#self.pyas_scan_write_en(fullpath)
#elif '.tmp' in str(fd) or '.TMP' in str(fd):
#self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
#QApplication.processEvents()
#if self.pyas_scan_start(fullpath,rfp):
#self.pyas_scan_write_en(fullpath)
else:
if 'C:/Windows' in str(fullpath):
pass
elif 'C:/Program' in str(fullpath):
pass
elif 'AppData' in str(fullpath):
pass
else:
if self.Virus_Scan == 0:
self.ui.Virus_Scan_Break_Button.hide()
break
elif '.exe' in str(fd) or '.EXE' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.cmd' in str(fd) or '.CMD' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.bat' in str(fd) or '.BAT' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.com' in str(fd) or '.COM' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.vbs' in str(fd) or '.VBS' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.js' in str(fd) or '.JS' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.xls' in str(fd) or '.XLS' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.doc' in str(fd) or '.DOC' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.dll' in str(fd) or '.DLL' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
elif '.scr' in str(fd) or '.SCR' in str(fd):
self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
QApplication.processEvents()
if self.pyas_scan_start(fullpath,rfp):
self.pyas_scan_write_en(fullpath)
#elif '.zip' in str(fd) or '.ZIP' in str(fd):
#self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
#QApplication.processEvents()
#if self.pyas_scan_start(fullpath,rfp):
#self.pyas_scan_write_en(fullpath)
#elif '.tmp' in str(fd) or '.TMP' in str(fd):
#self.ui.Virus_Scan_text.setText(self.scaning+fullpath)
#QApplication.processEvents()
#if self.pyas_scan_start(fullpath,rfp):
#self.pyas_scan_write_en(fullpath)
else:
pass
except:
continue
except:
@@ -1442,6 +1542,15 @@ If you do not download from the official website, we cannot guarantee the securi
webbrowser.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
self.ui.Customize_CMD_Command_output.setText(english_list["never gonna give you up"])
return
if CMD_Command == "python antivirus software" or CMD_Command == "Python Antivirus Software" \
or CMD_Command == "PYAS" or CMD_Command == "pyas":
self.ui.Customize_CMD_Command_output.setText(english_list["PYAS"])
return
#if CMD_Command == "OLD" or CMD_Command == "old" \
#or CMD_Command == "TK" or CMD_Command == "tk" \
#or CMD_Command == "TKINTER" or CMD_Command == "tkinter":
#import PYAS_Old
#return
if CMD_Command != '':
try:
si = subprocess.STARTUPINFO()
@@ -1528,6 +1637,8 @@ If you do not download from the official website, we cannot guarantee the securi
File_Name = self.ui.Look_for_File_input.text()
if File_Name != "":
self.find_files_info_zh(File_Name)
else:
QMessageBox.information(self,self.text_Translate("提示"),self.text_Translate("請輸入需要尋找的檔案"),QMessageBox.Ok)
def find_files_info_zh(self,ffile):
@@ -1562,19 +1673,27 @@ If you do not download from the official website, we cannot guarantee the securi
self.findfile_zh('Z:/',ffile,fss,start)
end = time.time()
try:
ft = open('Library/PYAS/Temp/PYASF.tmp','r',encoding="utf-8")
fe = ft.read()
ft.close()
try:
ft = open('Library/PYAS/Temp/PYASF.tmp','r',encoding="utf-8")
fe = ft.read()
ft.close()
except:
ft = open('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASF.tmp','r',encoding="utf-8")
fe = ft.read()
ft.close()
except Exception as e:
QMessageBox.critical(self,"Error",str(e),QMessageBox.Ok)
self.ui.Look_for_File_output.setText("")
self.ui.Look_for_File_output.append(self.text_Translate('尋找結果:')+'\n'+str(fe))
QApplication.processEvents()
self.Change_Tools(self.ui.Look_for_File_widget)
self.Change_Tools(self.ui.Look_for_File_widget)
except:
pass
try:
try:
os.remove('Library/PYAS/Temp/PYASF.tmp')
except:
pass
os.remove('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASF.tmp')
except:
pass
@@ -1585,20 +1704,27 @@ If you do not download from the official website, we cannot guarantee the securi
try:
QApplication.processEvents()
fullpath = os.path.join(path,fd)
if os.path.isdir(fullpath):
self.findfile_zh(fullpath,ffile,fss,start)
else:
fss = fss + 1
if ffile in str(fd):
try:
date = time.ctime(os.path.getmtime(fullpath))
ft = open('Library/PYAS/Temp/PYASF.tmp','a',encoding="utf-8")
#print(str(self.text_Translate('找到檔案:')+str(fullpath)+'\n'+self.text_Translate('創建日期:')+str(date)+'\n'+'\n'))
ft.write(str(self.text_Translate('找到檔案:')+str(fullpath)+'\n'+self.text_Translate('創建日期:')+str(date)+'\n'+'\n'))
ft.close()
continue
except:
pass
if 'C:/Windows' not in fullpath:
if os.path.isdir(fullpath):
self.findfile_zh(fullpath,ffile,fss,start)
else:
fss = fss + 1
if ffile in str(fd):
try:
date = time.ctime(os.path.getmtime(fullpath))
try:
ft = open('Library/PYAS/Temp/PYASF.tmp','a',encoding="utf-8")
#print(str(self.text_Translate('找到檔案:')+str(fullpath)+'\n'+self.text_Translate('創建日期:')+str(date)+'\n'+'\n'))
ft.write(str(self.text_Translate('找到檔案:')+str(fullpath)+'\n'+self.text_Translate('創建日期:')+str(date)+'\n'+'\n'))
ft.close()
except:
ft = open('C:/Program Files (x86)/PYAS/Library/PYAS/Temp/PYASF.tmp','a',encoding="utf-8")
#print(str(self.text_Translate('找到檔案:')+str(fullpath)+'\n'+self.text_Translate('創建日期:')+str(date)+'\n'+'\n'))
ft.write(str(self.text_Translate('找到檔案:')+str(fullpath)+'\n'+self.text_Translate('創建日期:')+str(date)+'\n'+'\n'))
ft.close()
continue
except:
pass
except:
continue
except Exception as e:
@@ -1748,8 +1874,18 @@ If you do not download from the official website, we cannot guarantee the securi
QMessageBox.critical(self,"Error",str(e),QMessageBox.Ok)
def pyas_protect_init_zh(self):
with open('Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
try:
ft = open('Library/PYAS/Temp/PYASP.tmp','w',encoding='utf-8')
fe = ft.write('')
ft.close()
except:
pass
try:
with open('Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
except:
with open('C:/Program Files (x86)/PYAS/Library/PYAE/Hashes/Viruslist.md5','r') as fp:
rfp = fp.read()
self.Virus_Scan = 1
if self.ui.Protection_switch_Button.text() == self.text_Translate("已關閉"):
self.ui.Protection_illustrate.setText(self.text_Translate("啟用該選項可以實時監控進程中的惡意軟體並清除。"))
@@ -1784,12 +1920,20 @@ If you do not download from the official website, we cannot guarantee the securi
QApplication.processEvents()
while 1:
if not self.pause:
try:
ft = open('Library/PYAS/Temp/PYASP.tmp','r',encoding='utf-8')
fe = ft.read()
ft.close()
except:
sys.exit()
self.Virus_Scan = 1
for p in psutil.process_iter():
try:
if 'C:\Windows' in str(p.exe()):
pass
elif 'C:\Program Files' in str(p.exe()):
elif 'C:\Program' in str(p.exe()):
pass
elif 'AppData' in str(p.exe()):
pass
else:
if self.pyas_scan_start(p.exe(),rfp):
@@ -1798,10 +1942,16 @@ If you do not download from the official website, we cannot guarantee the securi
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()))
try:
pygame.mixer.init()
if not pygame.mixer.music.get_busy():
pygame.mixer.music.load('./Library/PYAS/Audio/Virusfound.ogg')
pygame.mixer.music.play()
try:
pygame.mixer.init()
if not pygame.mixer.music.get_busy():
pygame.mixer.music.load('./Library/PYAS/Audio/Virusfound.ogg')
pygame.mixer.music.play()
except:
pygame.mixer.init()
if not pygame.mixer.music.get_busy():
pygame.mixer.music.load('C:/Program Files (x86)/PYAS/Library/PYAS/Audio/Virusfound.ogg')
pygame.mixer.music.play()
except:
pass
else:
@@ -1850,12 +2000,19 @@ If you do not download from the official website, we cannot guarantee the securi
def Show_Virus_Scan_Progress_Bar_switch(self):
try:
self.ini_config = configparser.RawConfigParser()
self.ini_config.read(r"./Library/PYAS/Setup/PYAS.ini")
try:
self.ini_config = configparser.RawConfigParser()
self.ini_config.read(r"./Library/PYAS/Setup/PYAS.ini")
except:
self.ini_config = configparser.RawConfigParser()
self.ini_config.read(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini")
try:
if self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.text() == self.text_Translate("已關閉"):
self.ini_config.set("Setting", "high_sensitivity", 1)
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
try:
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
except:
self.ini_config.write(open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini", 'w'))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setText(self.text_Translate("已開啟"))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setStyleSheet("""
QPushButton
@@ -1872,7 +2029,10 @@ If you do not download from the official website, we cannot guarantee the securi
self.show_virus_scan_progress_bar = 1
elif self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.text() == self.text_Translate("已关闭"):
self.ini_config.set("Setting", "high_sensitivity", 1)
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
try:
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
except:
self.ini_config.write(open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini", 'w'))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setText(self.text_Translate("已开启"))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setStyleSheet("""
QPushButton
@@ -1889,7 +2049,10 @@ If you do not download from the official website, we cannot guarantee the securi
self.show_virus_scan_progress_bar = 1
elif self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.text() == self.text_Translate("已开启"):
self.ini_config.set("Setting", "high_sensitivity", 0)
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
try:
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
except:
self.ini_config.write(open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini", 'w'))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setText(self.text_Translate("已关闭"))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setStyleSheet("""
QPushButton
@@ -1906,7 +2069,10 @@ If you do not download from the official website, we cannot guarantee the securi
self.show_virus_scan_progress_bar = 0
elif self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.text() == self.text_Translate("已開啟"):
self.ini_config.set("Setting", "high_sensitivity", 0)
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
try:
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
except:
self.ini_config.write(open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini", 'w'))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setText(self.text_Translate("已關閉"))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setStyleSheet("""
QPushButton
@@ -1923,7 +2089,10 @@ If you do not download from the official website, we cannot guarantee the securi
self.show_virus_scan_progress_bar = 0
else:
self.ini_config.set("Setting", "high_sensitivity", 0)
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
try:
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
except:
self.ini_config.write(open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini", 'w'))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setText(self.text_Translate("已關閉"))
self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.setStyleSheet("""
QPushButton
@@ -1940,15 +2109,25 @@ If you do not download from the official website, we cannot guarantee the securi
self.show_virus_scan_progress_bar = 0
#print(str(self.ui.Show_Virus_Scan_Progress_Bar_switch_Button.text()))
except:
with open(r"./Library/PYAS/Setup/PYAS.ini",mode="w",encoding="utf-8") as file:
file.write("[Setting]\nhigh_sensitivity = 0\nlanguage = english")
try:
with open(r"./Library/PYAS/Setup/PYAS.ini",mode="w",encoding="utf-8") as file:
file.write("[Setting]\nhigh_sensitivity = 0\nlanguage = english")
file.close()
except:
with open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini",mode="w",encoding="utf-8") as file:
file.write("[Setting]\nhigh_sensitivity = 0\nlanguage = english")
file.close()
except:
pass
def Change_language(self):
try:
self.ini_config = configparser.RawConfigParser()
self.ini_config.read(r"./Library/PYAS/Setup/PYAS.ini")
try:
self.ini_config = configparser.RawConfigParser()
self.ini_config.read(r"./Library/PYAS/Setup/PYAS.ini")
except:
self.ini_config = configparser.RawConfigParser()
self.ini_config.read(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini")
if self.ui.Language_Traditional_Chinese.isChecked():
self.lang_init_zh_tw()
self.language = "zh_TW"
@@ -1965,7 +2144,10 @@ If you do not download from the official website, we cannot guarantee the securi
print(e)
#QMessageBox.critical(self,"Error: ",str(e),QMessageBox.Ok)
try:
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
try:
self.ini_config.write(open(r"./Library/PYAS/Setup/PYAS.ini", 'w'))
except:
self.ini_config.write(open(r"C:/Program Files (x86)/PYAS/Library/PYAS/Setup/PYAS.ini", 'w'))
except:
pass
@@ -2099,6 +2281,10 @@ If you do not download from the official website, we cannot guarantee the securi
pat2.drawRoundedRect(rect, 1, 1)
if __name__ == '__main__':
try:
os.remove('Library/PYAS/Temp/PYASP.tmp')
except:
pass
import sys
app = QtWidgets.QApplication(sys.argv)
window = MainWindow_Controller()
+17
View File
@@ -1,4 +1,5 @@
english_list = {
"提示":"Tips",
"已開啟":"On",
"已關閉":"Off",
"已开启":"On",
@@ -8,6 +9,8 @@ english_list = {
" 被創建":" Created",
" 被刪除":" Deleted",
" 被編輯":" Edited",
"請輸入需要尋找的檔案":"Please enter the file you want to find",
"请输入需要寻找的档案":"Please enter the file you want to find",
"✔成功: 已執行成功。":"✔Success: Executed successfully.",
"這台電腦目前很安全":"This computer is currently safe",
"✖錯誤: 執行失敗。":"✖Error: Execution failed.",
@@ -72,6 +75,20 @@ english_list = {
'{} > [實時防護] 惡意軟體攔截失敗:':'{} > [Real-Time Protect] Malware blocking failed:',
'修復系統權限':"Repair System Permissions",
'啟用該選項可以實時監控系統的檔案讀寫變更行為。':"Enable this option can improve scanning sensitivity, but it can also cause manslaughter.",
'PYAS':"""PYAS Python Antivirus Software Security
========================================
PYAS Create Date: 2020/12/17
Official Email: xiaomi69ai@gmail.com
Official Github: https://github.com/87owo/PYAS
Official Website: https://pyantivirus.wixsite.com/pyas
PYAS Core Developer: PYAS_Dev#0629
PYAS GUI Developer: Mtkiao129#3921
PYAS Testers: PYAS_Dev#0629, Mtkiao129#3921
Special Thanks: Wix, Avast, Github, Google, Python,
Microsoft, VirusTotal, VirusShare, LenStevens
========================================
Thanks For Using PYAS Python Antivirus Software
""",
"never gonna give you up":"""We are no strangers to love
You know the rules and so do I
A full commitment′s what I am thinking of
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -1811,7 +1811,7 @@ class Ui_MainWindow(object):
self.PYAS_URL.setOpenExternalLinks(True)
self.PYAS_URL.setObjectName("PYAS_URL")
self.PYAS_CopyRight = QtWidgets.QLabel(self.About_widget)
self.PYAS_CopyRight.setGeometry(QtCore.QRect(20, 450, 621, 31))
self.PYAS_CopyRight.setGeometry(QtCore.QRect(20, 440, 621, 41))
font = QtGui.QFont()
font.setFamily("Microsoft YaHei")
font.setPointSize(13)
@@ -1834,7 +1834,7 @@ class Ui_MainWindow(object):
self.PYAE_Version.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.PYAE_Version.setObjectName("PYAE_Version")
self.License_terms = QtWidgets.QTextEdit(self.About_widget)
self.License_terms.setGeometry(QtCore.QRect(20, 350, 621, 101))
self.License_terms.setGeometry(QtCore.QRect(20, 350, 621, 91))
self.License_terms.setStyleSheet("")
self.License_terms.setReadOnly(True)
self.License_terms.setObjectName("License_terms")
+15 -3
View File
@@ -1,8 +1,20 @@
Python Antivirus Software
# PYAS (Python Antivirus Software)
PYAS contains a large number of databases, with an average of 200,000 new data sets added every month,PYAS can also detect unknown computer viruses in advance through functional scanning.
Official website:
## Official Website
https://pyantivirus.wixsite.com/pyas ,
https://github.com/87owo/PYAS
Special thanks to:
## Hashes Library
https://github.com/87owo/ViruslistMD5/releases
## Support System
Windows 8.1, 10, 11 (64-bit) or higher
## Import Module
os, time, sys, psutil, socket, subprocess, platform, cryptocode, threading, pygame, datetime, configparser, webbrowser, PYAS_English, pefile, hashlib, PyQt5, PYAS_UI, win32api,win32con
## Special Thanks
Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
Copyright© 2020~2022 PYAS Security
+2 -2
View File
@@ -1,8 +1,8 @@
import pyinstaller_versionfile
pyinstaller_versionfile.create_versionfile(
output_file="versionfile.txt",
version='2.3.6',
company_name="PYAS",
version='2.3.8',
company_name="PYAS Security",
file_description="Python Antivirus Software",
internal_name="PYAS",
legal_copyright="Copyright© 2020-2022 PYAS",