|
|
|
@@ -1,8 +1,8 @@
|
|
|
|
|
####################################################################################
|
|
|
|
|
# Coding Python 3 UTF-8 (Python IDLE)
|
|
|
|
|
#
|
|
|
|
|
# PYAS Ver: PYAS V2.1.1 (2020.12.17)
|
|
|
|
|
# PYAE Ver: PYAS V1.2.0 (2022.03.04)
|
|
|
|
|
# PYAS Ver: PYAS V2.1.5 (2020.12.17)
|
|
|
|
|
# PYAE Ver: PYAS V1.2.3 (2022.03.04)
|
|
|
|
|
# Support: Windows 7,8,10,11 64-bit
|
|
|
|
|
#
|
|
|
|
|
# PYAS Git: https://github.com/87owo/PYAS
|
|
|
|
@@ -14,8 +14,9 @@
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
#版本資訊
|
|
|
|
|
pyas_virsion = '2.1.2'
|
|
|
|
|
pyae_virsion = '1.2.1'
|
|
|
|
|
pyas_virsion = '2.1.5'
|
|
|
|
|
pyae_virsion = '1.2.3'
|
|
|
|
|
dev_edition_times = 0
|
|
|
|
|
pyas_copyright = 'Copyright© 2020-2022 PYAS Python Antivirus Software.'
|
|
|
|
|
pyas_legal_copyright = 'Copyright© 2020-2022 PYAS'
|
|
|
|
|
|
|
|
|
@@ -126,6 +127,7 @@ Language: Setting > Change Language
|
|
|
|
|
|
|
|
|
|
#許可條款
|
|
|
|
|
def pyas_license_terms_en():
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", '''PYTHON ANTIVIRUS SOFTWARE LICENSE TERMS
|
|
|
|
|
#Use PYAS anti-virus software and services means that you accept these terms. If you do not accept them, please do not use them.
|
|
|
|
|
#Use PYAS anti-virus software and services, if you comply with the PYAS anti-virus software license terms, you will have the following rights.
|
|
|
|
@@ -152,6 +154,13 @@ Login editor management authority
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
def easter_game():#not cplt
|
|
|
|
|
block = '█'
|
|
|
|
|
ax = '-----'
|
|
|
|
|
go = 'Game Over'
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
#定義清除畫面
|
|
|
|
|
def pyas_clear():
|
|
|
|
|
textPad.delete(1.0,END)
|
|
|
|
@@ -229,29 +238,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 +274,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 +292,7 @@ def protect_threading_init_en():
|
|
|
|
|
root.update()
|
|
|
|
|
t = threading.Thread(target = pyas_protect_init_en)
|
|
|
|
|
t.start()
|
|
|
|
|
#t.join()
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
@@ -287,8 +300,8 @@ 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()
|
|
|
|
|
#with open('Library/PYAE/Function/Viruslist.func','r') as fn:
|
|
|
|
|
#rfn = fn.read()
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", en_success)
|
|
|
|
|
root.update()
|
|
|
|
@@ -315,34 +328,10 @@ def pyas_protect_init_en():
|
|
|
|
|
textPad.insert("insert", 'Malware blocking failed: '+str(p.name()))
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
fts = 0
|
|
|
|
|
pe = PE(p.exe())
|
|
|
|
|
for entry in pe.DIRECTORY_ENTRY_IMPORT:
|
|
|
|
|
for function in entry.imports:
|
|
|
|
|
root.update()
|
|
|
|
|
if str(function.name) in rfn:
|
|
|
|
|
fts = fts + 1
|
|
|
|
|
if fts != 0:
|
|
|
|
|
fts = 0
|
|
|
|
|
pyas_clear()
|
|
|
|
|
of = subprocess.call('taskkill /f /im "'+str(p.name())+'"',shell=True)
|
|
|
|
|
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()
|
|
|
|
|
#pyas_protect_init_en()
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
#定義智能掃描
|
|
|
|
@@ -446,63 +435,11 @@ def pyas_scan_path_en(path,rfp,rfn,fts):
|
|
|
|
|
if fts != 0:
|
|
|
|
|
pyas_scan_write_en(str(fullpath))
|
|
|
|
|
fts = 0
|
|
|
|
|
elif '.cmd' in str(fd) or '.CMD' 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 '.bat' in str(fd) or '.BAT' 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 '.com' in str(fd) or '.COM' 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 '.vbs' in str(fd) or '.VBS' 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 '.zip' in str(fd) or '.COM' 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 '.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
|
|
|
|
|
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)
|
|
|
|
|
except:
|
|
|
|
|
continue
|
|
|
|
|
except:
|
|
|
|
@@ -1098,19 +1035,79 @@ 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 run_vmware_windows():
|
|
|
|
|
os.system('start "'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\VMware\vmware-kvm.exe" "'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\Windows\Windows 11.vmx"')
|
|
|
|
|
print('"'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\VMware\vmware-kvm.exe" "'+str(pathlib.Path(__file__).parent.absolute())+'\Library\PYAP\Windows\Windows 11.vmx"')
|
|
|
|
|
#run_vmware_windows()
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
#關於
|
|
|
|
|
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 >= 2:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','w')
|
|
|
|
|
er.write('0')
|
|
|
|
|
er.close()
|
|
|
|
|
messagebox.showinfo('?????????','''???????????????????????????????????????????????????''')
|
|
|
|
|
x = ''
|
|
|
|
|
pdinfo = '''
|
|
|
|
|
PYAS Developer: PYAS_Dev#0629 , Mtkiao129#3921 , Dragon#5381
|
|
|
|
|
Official Email: [email protected]
|
|
|
|
|
Official Github: https://github.com/87owo/PYAS
|
|
|
|
|
Official Website: https://xiaomi69ai.wixsite.com/pyas
|
|
|
|
|
PYAS Create Date: 2020/12/17
|
|
|
|
|
PYAS Version: 2.1.5
|
|
|
|
|
PYAE Version: 1.2.3
|
|
|
|
|
Special Thanks: Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
|
|
|
|
|
'''
|
|
|
|
|
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.ogg')
|
|
|
|
|
pygame.mixer.music.play()
|
|
|
|
|
for i in pdinfo:
|
|
|
|
|
x = x+i
|
|
|
|
|
time.sleep(0.1)
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",'''PYAS Infomation:
|
|
|
|
|
'''+str(pyas_divider)+str(x)+'_')
|
|
|
|
|
root.update()
|
|
|
|
|
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''')
|
|
|
|
|
|
|
|
|
|
#about_pyas_en()
|
|
|
|
|
def software_version_en():
|
|
|
|
|
pyas_clear()
|
|
|
|
|
messagebox.showinfo('Version','''Software Version: '''+pyas_virsion)
|
|
|
|
@@ -1148,6 +1145,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 = #)
|
|
|
|
@@ -1162,6 +1160,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)
|
|
|
|
@@ -1245,6 +1244,7 @@ def protect_threading_init_zh():
|
|
|
|
|
root.update()
|
|
|
|
|
t = threading.Thread(target = pyas_protect_init_zh)
|
|
|
|
|
t.start()
|
|
|
|
|
#t.join()
|
|
|
|
|
else:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
@@ -1252,8 +1252,8 @@ 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()
|
|
|
|
|
#with open('Library/PYAE/Function/Viruslist.func','r') as fn:
|
|
|
|
|
#rfn = fn.read()
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert", zh_success)
|
|
|
|
|
root.update()
|
|
|
|
@@ -1280,34 +1280,22 @@ def pyas_protect_init_zh():
|
|
|
|
|
textPad.insert("insert", '惡意軟體攔截失敗: '+str(p.name()))
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
fts = 0
|
|
|
|
|
pe = PE(p.exe())
|
|
|
|
|
for entry in pe.DIRECTORY_ENTRY_IMPORT:
|
|
|
|
|
for function in entry.imports:
|
|
|
|
|
root.update()
|
|
|
|
|
if str(function.name) in rfn:
|
|
|
|
|
fts = fts + 1
|
|
|
|
|
if fts != 0:
|
|
|
|
|
fts = 0
|
|
|
|
|
pyas_clear()
|
|
|
|
|
of = subprocess.call('taskkill /f /im "'+str(p.name())+'"',shell=True)
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
|
#定義紀錄掃描
|
|
|
|
|
def pyas_scan_write_zh(file):
|
|
|
|
@@ -1379,28 +1367,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
|
|
|
|
|
|
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
|
@@ -1528,63 +1508,11 @@ def pyas_scan_path_zh(path,rfp,rfn,fts):
|
|
|
|
|
if fts != 0:
|
|
|
|
|
pyas_scan_write_zh(str(fullpath))
|
|
|
|
|
fts = 0
|
|
|
|
|
elif '.cmd' in str(fd) or '.CMD' 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 '.bat' in str(fd) or '.BAT' 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 '.com' in str(fd) or '.COM' 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 '.vbs' in str(fd) or '.VBS' 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 '.zip' in str(fd) or '.ZIP' 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 '.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
|
|
|
|
|
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)
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print(e)
|
|
|
|
|
continue
|
|
|
|
@@ -2181,10 +2109,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():
|
|
|
|
@@ -2200,7 +2143,48 @@ 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 >= 2:
|
|
|
|
|
er = open('.\Library\PYAS\Temp\PYASE.tmp','w')
|
|
|
|
|
er.write('0')
|
|
|
|
|
er.close()
|
|
|
|
|
messagebox.showinfo('?????????','''???????????????????????????????????????????????????''')
|
|
|
|
|
x = ''
|
|
|
|
|
pdinfo = '''
|
|
|
|
|
開發人員: PYAS_Dev#0629 , Mtkiao129#3921 , Dragon#5381
|
|
|
|
|
官方郵箱: [email protected]
|
|
|
|
|
官方GIT: https://github.com/87owo/PYAS
|
|
|
|
|
官方網站: https://xiaomi69ai.wixsite.com/pyas
|
|
|
|
|
創立日期: 2020/12/17
|
|
|
|
|
PYAS 版本: 2.1.5
|
|
|
|
|
PYAE 版本: 1.2.3
|
|
|
|
|
特別感謝: Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
|
|
|
|
|
'''
|
|
|
|
|
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.ogg')
|
|
|
|
|
pygame.mixer.music.play()
|
|
|
|
|
for i in pdinfo:
|
|
|
|
|
x = x+i
|
|
|
|
|
time.sleep(0.1)
|
|
|
|
|
pyas_clear()
|
|
|
|
|
textPad.insert("insert",'''PYAS Infomation:
|
|
|
|
|
'''+str(pyas_divider)+str(x)+'_')
|
|
|
|
|
root.update()
|
|
|
|
|
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():
|
|
|
|
@@ -2240,7 +2224,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)
|
|
|
|
@@ -2254,6 +2238,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)
|
|
|
|
|