|
|
|
@@ -14,8 +14,9 @@
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
#版本資訊
|
|
|
|
|
pyas_virsion = '2.1.1'
|
|
|
|
|
pyae_virsion = '1.2.0'
|
|
|
|
|
pyas_virsion = '2.1.3'
|
|
|
|
|
pyae_virsion = '1.2.2'
|
|
|
|
|
dev_edition_times = 0
|
|
|
|
|
pyas_copyright = 'Copyright© 2020-2022 PYAS Python Antivirus Software.'
|
|
|
|
|
pyas_legal_copyright = 'Copyright© 2020-2022 PYAS'
|
|
|
|
|
|
|
|
|
@@ -229,29 +230,21 @@ def software_update_en():
|
|
|
|
|
webbrowser.open('https://xiaomi69ai.wixsite.com/pyas')
|
|
|
|
|
|
|
|
|
|
def engine_update_en():
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", 'Update Please Wait...')
|
|
|
|
|
root.update()
|
|
|
|
|
v = open('Library/PYAE/Hashes/Viruslist.version','r')
|
|
|
|
|
ver = int(v.read())+1
|
|
|
|
|
v.close()
|
|
|
|
|
try:
|
|
|
|
|
for i in range(ver,10000):
|
|
|
|
|
root.update()
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", 'Update Version: '+str(i))
|
|
|
|
|
x = 5 - len(str(i))
|
|
|
|
|
y = '0'*x+str(i)
|
|
|
|
|
file = req.get('https://virusshare.com/hashfiles/VirusShare_'+str(y)+'.md5', allow_redirects=True)
|
|
|
|
|
open('Library/PYAE/Hashes/Viruslist.md5', 'a').write(str(file.content)+'\n')
|
|
|
|
|
except:
|
|
|
|
|
v = open('Library/PYAE/Hashes/Viruslist.version','w')
|
|
|
|
|
v.write(str(i-1))
|
|
|
|
|
v.close()
|
|
|
|
|
if messagebox.askokcancel('Warning','Update Antivirus Engine ,Do You want to continue?', default="cancel", icon="warning"):
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", 'Update Complete, PYAE Version: '+str(pyae_virsion)+'_'+str(i-1))
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
textPad.insert("insert", 'Update Please Wait...')
|
|
|
|
|
root.update()
|
|
|
|
|
try:
|
|
|
|
|
file = req.get('https://github.com/87owo/ViruslistMD5/releases/download/v420/Viruslist.md5', allow_redirects=True)
|
|
|
|
|
open('Library/PYAE/Hashes/Viruslist.md5', 'w').write(str(file.content)+'\n')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", 'Update Complete.')
|
|
|
|
|
root.update()
|
|
|
|
|
except Exception as e:
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", 'Update Failed: '+str(e))
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
#定義開始掃描
|
|
|
|
@@ -273,6 +266,17 @@ def pyas_scan_start(file,rfp):
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
def protect_background_en():
|
|
|
|
|
textPad.insert("insert", en_init_file)
|
|
|
|
|
root.update()
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",en_app_use)
|
|
|
|
|
root.update()
|
|
|
|
|
subprocess.run('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAE\Engine\PYAE.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
#定義防護
|
|
|
|
|
def protect_threading_init_en():
|
|
|
|
|
if messagebox.askokcancel('Warning','''Enable Real Time Protection Needs More Then 4GB Of RAM. Do you want to continue?''', default="cancel", icon="warning"):
|
|
|
|
@@ -280,6 +284,7 @@ def protect_threading_init_en():
|
|
|
|
|
root.update()
|
|
|
|
|
t = threading.Thread(target = pyas_protect_init_en)
|
|
|
|
|
t.start()
|
|
|
|
|
#t.join()
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
@@ -287,30 +292,38 @@ def protect_threading_init_en():
|
|
|
|
|
def pyas_protect_init_en():
|
|
|
|
|
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()
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", en_success)
|
|
|
|
|
root.update()
|
|
|
|
|
while 1:
|
|
|
|
|
for p in psutil.process_iter():
|
|
|
|
|
try:
|
|
|
|
|
if 'C:/Windows' not in str(p.exe()):
|
|
|
|
|
if 'C:\Windows' in str(p.exe()):
|
|
|
|
|
pass
|
|
|
|
|
elif 'C:\Program Files' in str(p.exe()):
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
if pyas_scan_start(p.exe(),rfp):
|
|
|
|
|
pyas_clear()
|
|
|
|
|
of = subprocess.call('taskkill /f /im "'+str(p.name())+'"',shell=True)
|
|
|
|
|
if of == 0:
|
|
|
|
|
textPad.insert("insert", 'Successfully blocked a malware: '+str(p.name()))
|
|
|
|
|
pygame.mixer.init()
|
|
|
|
|
pygame.mixer.music.set_volume(1.0)
|
|
|
|
|
if not pygame.mixer.music.get_busy():
|
|
|
|
|
pygame.mixer.music.load('./Library/PYAS/Audio/Virusfound.ogg')
|
|
|
|
|
pygame.mixer.music.play()
|
|
|
|
|
else:
|
|
|
|
|
textPad.insert("insert", 'Malware blocking failed: '+str(p.name()))
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
except:
|
|
|
|
|
try:
|
|
|
|
|
if of == 0:
|
|
|
|
|
textPad.insert("insert", 'Successfully blocked a malware: '+str(p.name()))
|
|
|
|
|
pygame.mixer.init()
|
|
|
|
|
pygame.mixer.music.set_volume(1.0)
|
|
|
|
|
if not pygame.mixer.music.get_busy():
|
|
|
|
|
pygame.mixer.music.load('./Library/PYAS/Audio/Virusfound.ogg')
|
|
|
|
|
pygame.mixer.music.play()
|
|
|
|
|
else:
|
|
|
|
|
textPad.insert("insert", 'Malware blocking failed: '+str(p.name()))
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print(e)
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
#pyas_protect_init_en()
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
#定義智能掃描
|
|
|
|
@@ -321,9 +334,9 @@ def pyas_scan_smart_en():
|
|
|
|
|
with open('Library/PYAE/Hashes/Viruslist.md5','r') as fp:
|
|
|
|
|
rfp = fp.read()
|
|
|
|
|
fp.close()
|
|
|
|
|
pyas_scan_path_en("Desktop/",rfp)
|
|
|
|
|
pyas_scan_path_en("Documents/",rfp)
|
|
|
|
|
pyas_scan_path_en("Downloads/",rfp)
|
|
|
|
|
pyas_scan_path_en("Desktop/",rfp,rfn,fts)
|
|
|
|
|
pyas_scan_path_en("Documents/",rfp,rfn,fts)
|
|
|
|
|
pyas_scan_path_en("Downloads/",rfp,rfn,fts)
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
@@ -397,7 +410,7 @@ def pyas_scan_path_en(path,rfp,rfn,fts):
|
|
|
|
|
fullpath = os.path.join(path,fd)
|
|
|
|
|
print(fullpath)
|
|
|
|
|
if os.path.isdir(fullpath):
|
|
|
|
|
pyas_scan_path_en(fullpath,rfp)
|
|
|
|
|
pyas_scan_path_en(fullpath,rfp,rfn,fts)
|
|
|
|
|
else:
|
|
|
|
|
if '.exe' in str(fd) or '.EXE' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
@@ -439,6 +452,36 @@ def pyas_scan_path_en(path,rfp,rfn,fts):
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.js' in str(fd) or '.JS' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.xls' in str(fd) or '.XLS' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.doc' in str(fd) or '.DOC' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.dll' in str(fd) or '.DLL' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.scr' in str(fd) or '.SCR' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.tmp' in str(fd) or '.TMP' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
except:
|
|
|
|
@@ -527,6 +570,36 @@ def pyas_scan_disk_en(path,rfp):
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.js' in str(fd) or '.JS' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.xls' in str(fd) or '.XLS' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.doc' in str(fd) or '.DOC' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.dll' in str(fd) or '.DLL' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.scr' in str(fd) or '.SCR' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
elif '.tmp' in str(fd) or '.TMP' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_en(fullpath)
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
except:
|
|
|
|
@@ -1006,17 +1079,74 @@ def change_user_password_en(user,password):
|
|
|
|
|
os.system('net user '+str(user)+' "'+str(password)+'"')
|
|
|
|
|
|
|
|
|
|
def install_windows10_en():
|
|
|
|
|
os.system(str(pathlib.Path(__file__).parent.absolute())+'\\Library\\PYAP\\Windows\\Win10.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",en_app_use)
|
|
|
|
|
root.update()
|
|
|
|
|
subprocess.run('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\Windows\Win10.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
|
|
|
|
|
def install_windows11_en():
|
|
|
|
|
os.system(str(pathlib.Path(__file__).parent.absolute())+'\\Library\\PYAP\\Windows\\Win11.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",en_app_use)
|
|
|
|
|
root.update()
|
|
|
|
|
subprocess.run('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\Windows\Win11.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
|
|
|
|
|
def start_repair_mode_en():
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",en_app_use)
|
|
|
|
|
root.update()
|
|
|
|
|
subprocess.run('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\Others\WinTWS.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
#關於
|
|
|
|
|
def about_pyas_en():
|
|
|
|
|
pyas_clear()
|
|
|
|
|
messagebox.showinfo('Copyright','''Website: https://xiaomi69ai.wixsite.com/pyas
|
|
|
|
|
try:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','r')
|
|
|
|
|
dev_edition_times = int(er.read())
|
|
|
|
|
er.close()
|
|
|
|
|
except:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','w')
|
|
|
|
|
er.write('0')
|
|
|
|
|
er.close()
|
|
|
|
|
dev_edition_times = 0
|
|
|
|
|
if dev_edition_times >= 3:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','w')
|
|
|
|
|
er.write('0')
|
|
|
|
|
er.close()
|
|
|
|
|
messagebox.showinfo('????????','''????????????????????????????????????''')
|
|
|
|
|
textPad.insert("insert",'''PYAS Infomation:
|
|
|
|
|
'''+str(pyas_divider)+'''
|
|
|
|
|
PYAS Developer: PYAS_Dev#0629 , Mtkiao192#3921 , Dragon#5381
|
|
|
|
|
|
|
|
|
|
Official Email: [email protected]
|
|
|
|
|
|
|
|
|
|
Official Website: https://xiaomi69ai.wixsite.com/pyas
|
|
|
|
|
|
|
|
|
|
PYAS Create Date: 2020/12/17
|
|
|
|
|
|
|
|
|
|
PYAS Version: 2.1.3
|
|
|
|
|
|
|
|
|
|
PYAE Version: 1.2.2
|
|
|
|
|
|
|
|
|
|
FUNC Version: 1.0.0
|
|
|
|
|
|
|
|
|
|
HASH Version: 420 MD5
|
|
|
|
|
|
|
|
|
|
TKINTER Version: 3.0 (Select Mode Not Type Mode)''')
|
|
|
|
|
pygame.mixer.init()
|
|
|
|
|
pygame.mixer.music.set_volume(1.0)
|
|
|
|
|
if not pygame.mixer.music.get_busy():
|
|
|
|
|
pygame.mixer.music.load('./Library/PYAS/Audio/Easteregg.mp3')
|
|
|
|
|
pygame.mixer.music.play()
|
|
|
|
|
else:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','w')
|
|
|
|
|
er.write(str(dev_edition_times + 1))
|
|
|
|
|
er.close()
|
|
|
|
|
messagebox.showinfo('Copyright','''Website: https://xiaomi69ai.wixsite.com/pyas
|
|
|
|
|
Copyright© 2020-2022 PYAS Python Antivirus Software''')
|
|
|
|
|
|
|
|
|
|
def software_version_en():
|
|
|
|
@@ -1056,6 +1186,7 @@ def english():
|
|
|
|
|
menubar.add_cascade(label = ' Scan',menu = filemenu)
|
|
|
|
|
filemenu2 = Menu(menubar,tearoff=False)
|
|
|
|
|
filemenu2.add_command(label = 'Enable Real Time Protection',command = protect_threading_init_en)
|
|
|
|
|
#filemenu2.add_command(label = 'Enable Background Protection',command = protect_background_en)
|
|
|
|
|
#filemenu2.add_command(label = 'Disable Auto Protect',command = dprotect_threading_init_en)
|
|
|
|
|
#filemenu2.add_command(label = 'Behavioural Protect',command = #)
|
|
|
|
|
#filemenu2.add_command(label = 'Network Protect',command = #)
|
|
|
|
@@ -1070,6 +1201,7 @@ def english():
|
|
|
|
|
sub2menu.add_separator()
|
|
|
|
|
sub2menu.add_command(label = 'Repair System Files',command = repair_system_files_en)
|
|
|
|
|
sub2menu.add_command(label = 'Repair System Permissions',command = fix_cmd_permissions_en)
|
|
|
|
|
#sub2menu.add_command(label = 'Enable Dev Repair Mode',command = start_repair_mode_en)
|
|
|
|
|
sub2menu.add_separator()
|
|
|
|
|
sub2menu.add_command(label = 'Enable Safe Mode',command = start_safe_mode_en)
|
|
|
|
|
sub2menu.add_command(label = 'Disable safe mode',command = close_safe_Mode_en)
|
|
|
|
@@ -1153,6 +1285,7 @@ def protect_threading_init_zh():
|
|
|
|
|
root.update()
|
|
|
|
|
t = threading.Thread(target = pyas_protect_init_zh)
|
|
|
|
|
t.start()
|
|
|
|
|
#t.join()
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
@@ -1160,29 +1293,48 @@ def protect_threading_init_zh():
|
|
|
|
|
def pyas_protect_init_zh():
|
|
|
|
|
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()
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", zh_success)
|
|
|
|
|
root.update()
|
|
|
|
|
while 1:
|
|
|
|
|
for p in psutil.process_iter():
|
|
|
|
|
try:
|
|
|
|
|
if 'C:/Windows' not in str(p.exe()):
|
|
|
|
|
if 'C:\Windows' in str(p.exe()):
|
|
|
|
|
pass
|
|
|
|
|
elif 'C:\Program Files' in str(p.exe()):
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
if pyas_scan_start(p.exe(),rfp):
|
|
|
|
|
pyas_clear()
|
|
|
|
|
of = subprocess.call('taskkill /f /im "'+str(p.name())+'"',shell=True)
|
|
|
|
|
if of == 0:
|
|
|
|
|
textPad.insert("insert", '成功攔截了一個惡意軟體: '+str(p.name()))
|
|
|
|
|
pygame.mixer.init()
|
|
|
|
|
pygame.mixer.music.set_volume(1.0)
|
|
|
|
|
if not pygame.mixer.music.get_busy():
|
|
|
|
|
pygame.mixer.music.load('./Library/PYAS/Audio/Virusfound.ogg')
|
|
|
|
|
pygame.mixer.music.play()
|
|
|
|
|
else:
|
|
|
|
|
textPad.insert("insert", '惡意軟體攔截失敗: '+str(p.name()))
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
try:
|
|
|
|
|
if of == 0:
|
|
|
|
|
textPad.insert("insert", '成功攔截了一個惡意軟體: '+str(p.name()))
|
|
|
|
|
pygame.mixer.init()
|
|
|
|
|
pygame.mixer.music.set_volume(1.0)
|
|
|
|
|
if not pygame.mixer.music.get_busy():
|
|
|
|
|
pygame.mixer.music.load('./Library/PYAS/Audio/Virusfound.ogg')
|
|
|
|
|
pygame.mixer.music.play()
|
|
|
|
|
else:
|
|
|
|
|
textPad.insert("insert", '惡意軟體攔截失敗: '+str(p.name()))
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
#pyas_protect_init_zh()
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
def protect_background_zh():
|
|
|
|
|
textPad.insert("insert", zh_init_file)
|
|
|
|
|
root.update()
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",zh_app_use)
|
|
|
|
|
root.update()
|
|
|
|
|
subprocess.run('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAE\Engine\PYAE.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
#textPad.insert("insert", zh_success)
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
@@ -1256,28 +1408,20 @@ def software_update_zh():
|
|
|
|
|
webbrowser.open('https://xiaomi69ai.wixsite.com/pyas')
|
|
|
|
|
|
|
|
|
|
def engine_update_zh():
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", '正在更新中,請稍等。')
|
|
|
|
|
root.update()
|
|
|
|
|
v = open('Library/PYAE/Hashes/Viruslist.version','r')
|
|
|
|
|
ver = int(v.read())+1
|
|
|
|
|
v.close()
|
|
|
|
|
try:
|
|
|
|
|
for i in range(ver,10000):
|
|
|
|
|
root.update()
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", '正在更新: '+str(i))
|
|
|
|
|
x = 5 - len(str(i))
|
|
|
|
|
y = '0'*x+str(i)
|
|
|
|
|
file = req.get('https://virusshare.com/hashfiles/VirusShare_'+str(y)+'.md5', allow_redirects=True)
|
|
|
|
|
open('Library/PYAE/Hashes/Viruslist.md5', 'a').write(str(file.content)+'\n')
|
|
|
|
|
except:
|
|
|
|
|
v = open('Library/PYAE/Hashes/Viruslist.version','w')
|
|
|
|
|
v.write(str(i-1))
|
|
|
|
|
v.close()
|
|
|
|
|
if messagebox.askokcancel('Warning','更新掃毒引擎需要花費一些時間,是否繼續?', default="cancel", icon="warning"):
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", '更新完成,當前 PYAE 版本: '+str(pyae_virsion)+'_'+str(i-1))
|
|
|
|
|
pass
|
|
|
|
|
textPad.insert("insert", '正在更新中,請稍等。')
|
|
|
|
|
root.update()
|
|
|
|
|
try:
|
|
|
|
|
file = req.get('https://github.com/87owo/ViruslistMD5/releases/download/v420/Viruslist.md5', allow_redirects=True)
|
|
|
|
|
open('Library/PYAE/Hashes/Viruslist.md5', 'w').write(str(file.content)+'\n')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", '更新完成。')
|
|
|
|
|
root.update()
|
|
|
|
|
except Exception as e:
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", '更新失敗: '+str(e))
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
@@ -1312,9 +1456,9 @@ def pyas_scan_smart_zh():
|
|
|
|
|
with open('Library/PYAE/Hashes/Viruslist.md5','r') as fp:
|
|
|
|
|
rfp = fp.read()
|
|
|
|
|
fp.close()
|
|
|
|
|
pyas_scan_path_zh("Desktop/",rfp)
|
|
|
|
|
pyas_scan_path_zh("Documents/",rfp)
|
|
|
|
|
pyas_scan_path_zh("Downloads/",rfp)
|
|
|
|
|
pyas_scan_path_zh("Desktop/",rfp,rfn,fts)
|
|
|
|
|
pyas_scan_path_zh("Documents/",rfp,rfn,fts)
|
|
|
|
|
pyas_scan_path_zh("Downloads/",rfp,rfn,fts)
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
@@ -1388,7 +1532,7 @@ def pyas_scan_path_zh(path,rfp,rfn,fts):
|
|
|
|
|
fullpath = os.path.join(path,fd)
|
|
|
|
|
print(fullpath)
|
|
|
|
|
if os.path.isdir(fullpath):
|
|
|
|
|
pyas_scan_path_zh(fullpath,rfp)
|
|
|
|
|
pyas_scan_path_zh(fullpath,rfp,rfn,fts)
|
|
|
|
|
else:
|
|
|
|
|
if '.exe' in str(fd) or '.EXE' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
@@ -1430,6 +1574,36 @@ def pyas_scan_path_zh(path,rfp,rfn,fts):
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.js' in str(fd) or '.JS' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.xls' in str(fd) or '.XLS' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.doc' in str(fd) or '.DOC' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.dll' in str(fd) or '.DLL' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.scr' in str(fd) or '.SCR' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.tmp' in str(fd) or '.TMP' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
except Exception as e:
|
|
|
|
@@ -1519,6 +1693,36 @@ def pyas_scan_disk_zh(path,rfp):
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.js' in str(fd) or '.JS' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.xls' in str(fd) or '.XLS' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.doc' in str(fd) or '.DOC' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.dll' in str(fd) or '.DLL' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.scr' in str(fd) or '.SCR' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
elif '.tmp' in str(fd) or '.TMP' in str(fd):
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
|
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
|
|
|
|
if pyas_scan_start(fullpath,rfp):
|
|
|
|
|
pyas_scan_write_zh(fullpath)
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
except:
|
|
|
|
@@ -1998,10 +2202,25 @@ def change_user_password_zh(user,password):
|
|
|
|
|
os.system('net user '+str(user)+' "'+str(password)+'"')
|
|
|
|
|
|
|
|
|
|
def install_windows10_zh():
|
|
|
|
|
os.system(str(pathlib.Path(__file__).parent.absolute())+'\\Library\\PYAP\\Windows\\Win10.exe"')
|
|
|
|
|
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",zh_app_use)
|
|
|
|
|
root.update()
|
|
|
|
|
subprocess.run('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\Windows\Win10.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
#install_windows10_zh()
|
|
|
|
|
def install_windows11_zh():
|
|
|
|
|
os.system(str(pathlib.Path(__file__).parent.absolute())+'\\Library\\PYAP\\Windows\\Win11.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",zh_app_use)
|
|
|
|
|
root.update()
|
|
|
|
|
subprocess.run('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\Windows\Win11.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
|
|
|
|
|
def start_repair_mode_zh():
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",zh_app_use)
|
|
|
|
|
root.update()
|
|
|
|
|
subprocess.run('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\Others\WinTWS.exe"')
|
|
|
|
|
pyas_clear()
|
|
|
|
|
|
|
|
|
|
'''
|
|
|
|
|
def system_debug_zh():
|
|
|
|
@@ -2017,7 +2236,49 @@ def system_debug_zh():
|
|
|
|
|
#關於
|
|
|
|
|
def about_pyas_zh():
|
|
|
|
|
pyas_clear()
|
|
|
|
|
messagebox.showinfo('Copyright','''官方網站: https://xiaomi69ai.wixsite.com/pyas
|
|
|
|
|
try:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','r')
|
|
|
|
|
dev_edition_times = int(er.read())
|
|
|
|
|
er.close()
|
|
|
|
|
except:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','w')
|
|
|
|
|
er.write('0')
|
|
|
|
|
er.close()
|
|
|
|
|
dev_edition_times = 0
|
|
|
|
|
if dev_edition_times >= 3:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','w')
|
|
|
|
|
er.write('0')
|
|
|
|
|
er.close()
|
|
|
|
|
messagebox.showinfo('????????','''????????????????????????????????????''')
|
|
|
|
|
textPad.insert("insert",'''PYAS 詳細資訊:
|
|
|
|
|
'''+str(pyas_divider)+'''
|
|
|
|
|
開發人員: PYAS_Dev#0629 , Mtkiao192#3921 , Dragon#5381
|
|
|
|
|
|
|
|
|
|
官方郵件: [email protected]
|
|
|
|
|
|
|
|
|
|
官方網站: https://xiaomi69ai.wixsite.com/pyas
|
|
|
|
|
|
|
|
|
|
創建日期: 2020/12/17
|
|
|
|
|
|
|
|
|
|
PYAS 版本: 2.1.3
|
|
|
|
|
|
|
|
|
|
PYAE 版本: 1.2.2
|
|
|
|
|
|
|
|
|
|
FUNC 版本: 1.0.0
|
|
|
|
|
|
|
|
|
|
HASH 版本: 420 MD5
|
|
|
|
|
|
|
|
|
|
介面版本: 3.0 (選取模式非輸入模式)''')
|
|
|
|
|
pygame.mixer.init()
|
|
|
|
|
pygame.mixer.music.set_volume(1.0)
|
|
|
|
|
if not pygame.mixer.music.get_busy():
|
|
|
|
|
pygame.mixer.music.load('./Library/PYAS/Audio/Easteregg.mp3')
|
|
|
|
|
pygame.mixer.music.play()
|
|
|
|
|
else:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','w')
|
|
|
|
|
er.write(str(dev_edition_times + 1))
|
|
|
|
|
er.close()
|
|
|
|
|
messagebox.showinfo('Copyright','''官方網站: https://xiaomi69ai.wixsite.com/pyas
|
|
|
|
|
版權所有© 2020-2022 PYAS Python Antivirus Software''')
|
|
|
|
|
|
|
|
|
|
def software_version_zh():
|
|
|
|
@@ -2057,7 +2318,7 @@ def traditional_chinese():
|
|
|
|
|
menubar.add_cascade(label = ' 掃描',menu = filemenu)
|
|
|
|
|
filemenu2 = Menu(menubar,tearoff=False)
|
|
|
|
|
filemenu2.add_command(label = '啟動實時防護',command = protect_threading_init_zh)
|
|
|
|
|
#filemenu2.add_command(label = '關閉實時防護',command = dprotect_threading_init_zh)
|
|
|
|
|
#filemenu2.add_command(label = '啟動後台防護',command = protect_background_zh)
|
|
|
|
|
#filemenu2.add_command(label = 'Behavioural Protect',command = #)
|
|
|
|
|
#filemenu2.add_command(label = 'Network Protect',command = #)
|
|
|
|
|
menubar.add_cascade(label = '防護',menu = filemenu2)
|
|
|
|
@@ -2071,6 +2332,7 @@ def traditional_chinese():
|
|
|
|
|
sub2menu.add_separator()
|
|
|
|
|
sub2menu.add_command(label = '修復系統檔案',command = repair_system_files_zh)
|
|
|
|
|
sub2menu.add_command(label = '修復系統權限',command = fix_cmd_permissions_zh)
|
|
|
|
|
#sub2menu.add_command(label = '啟動進階修復',command = start_repair_mode_zh)
|
|
|
|
|
sub2menu.add_separator()
|
|
|
|
|
sub2menu.add_command(label = '啟動安全模式',command = start_safe_mode_zh)
|
|
|
|
|
sub2menu.add_command(label = '關閉安全模式',command = close_safe_Mode_zh)
|
|
|
|
|