Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3507802eb9 | ||
|
|
9588bdb7cc | ||
|
|
97ca2dcc79 | ||
|
|
44df3e9344 | ||
|
|
668c12bac7 | ||
|
|
f843bf7c08 |
No files matched your search
-177
@@ -1,177 +0,0 @@
|
||||
import hashlib
|
||||
import os
|
||||
from functools import partial
|
||||
import json
|
||||
import zipfile
|
||||
|
||||
def md5_file():
|
||||
for i in range(410):
|
||||
x = 5 - len(str(i))
|
||||
y = '0'*x+str(i)
|
||||
bytes = zipfile.ZipFile('Library/MD5.zip', 'r').read(str(y)+'.md5')
|
||||
|
||||
|
||||
#def pyae_scan():
|
||||
|
||||
def scan_sha256(file):
|
||||
try:
|
||||
virus_found = False
|
||||
with open(file,"rb") as f:
|
||||
bytes = f.read()
|
||||
readable_hash = hashlib.sha256(bytes).hexdigest();
|
||||
print("SHA256: " + readable_hash)
|
||||
with open("Library/SHA256.txt",'r') as f:
|
||||
lines = [line.rstrip() for line in f]
|
||||
for line in lines:
|
||||
if str(readable_hash) == str(line.split(";")[0]):
|
||||
virus_found = True
|
||||
f.close()
|
||||
if not virus_found:
|
||||
print("File is safe!")
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
#print("Virus detected! File quarentined")
|
||||
#os.remove(file)
|
||||
except:
|
||||
pass
|
||||
|
||||
def scan_md5(file):
|
||||
#try:
|
||||
virus_found = False
|
||||
with open(file,"rb") as f:
|
||||
bytes = f.read()
|
||||
readable_hash = hashlib.md5(bytes).hexdigest();
|
||||
#print("MD5: " + readable_hash)
|
||||
for i in range(410):
|
||||
x = 5 - len(str(i))
|
||||
y = '0'*x+str(i)
|
||||
with open('Library/MD5/'+str(y)+'.md5','r') as f:
|
||||
#print(str(f))
|
||||
lines = [line.rstrip() for line in f]
|
||||
for line in lines:
|
||||
if str(readable_hash) == str(line.split(";")[0]):
|
||||
#print(str(f))
|
||||
virus_found = True
|
||||
f.close()
|
||||
if not virus_found:
|
||||
#print("File is safe!")
|
||||
return False
|
||||
else:
|
||||
#print("Virus detected! File quarentined")
|
||||
#os.remove(file)
|
||||
return True
|
||||
#except Exception as e:
|
||||
# print(e)
|
||||
|
||||
|
||||
def scan(file):
|
||||
try:
|
||||
virus_found = False
|
||||
with open(file,"rb") as f:
|
||||
bytes = f.read()
|
||||
readable_hash = hashlib.sha1(bytes).hexdigest();
|
||||
print("SHA1: " + readable_hash)
|
||||
with open('Library/SHA1 HASHES.json', 'r') as f:
|
||||
dataset = json.loads(f.read())
|
||||
for index, item in enumerate(dataset["data"]):
|
||||
if str(item['hash']) == str(readable_hash):
|
||||
virus_found = True
|
||||
f.close()
|
||||
if not virus_found:
|
||||
print("File is safe!")
|
||||
return False
|
||||
else:
|
||||
#print("Virus detected! File quarentined")
|
||||
#os.remove(file)
|
||||
return True
|
||||
except:
|
||||
pass
|
||||
|
||||
def pyae_scan_full(filepath):
|
||||
try:
|
||||
fss = 0
|
||||
start = time.time()
|
||||
findfile('A:/',ffile,fss,start)
|
||||
findfile('B:/',ffile,fss,start)
|
||||
findfile('C:/',ffile,fss,start)
|
||||
findfile('D:/',ffile,fss,start)
|
||||
findfile('E:/',ffile,fss,start)
|
||||
findfile('F:/',ffile,fss,start)
|
||||
findfile('G:/',ffile,fss,start)
|
||||
findfile('H:/',ffile,fss,start)
|
||||
findfile('I:/',ffile,fss,start)
|
||||
findfile('J:/',ffile,fss,start)
|
||||
findfile('K:/',ffile,fss,start)
|
||||
findfile('L:/',ffile,fss,start)
|
||||
findfile('M:/',ffile,fss,start)
|
||||
findfile('N:/',ffile,fss,start)
|
||||
findfile('O:/',ffile,fss,start)
|
||||
findfile('P:/',ffile,fss,start)
|
||||
findfile('Q:/',ffile,fss,start)
|
||||
findfile('R:/',ffile,fss,start)
|
||||
findfile('S:/',ffile,fss,start)
|
||||
findfile('T:/',ffile,fss,start)
|
||||
findfile('U:/',ffile,fss,start)
|
||||
findfile('V:/',ffile,fss,start)
|
||||
findfile('W:/',ffile,fss,start)
|
||||
findfile('X:/',ffile,fss,start)
|
||||
findfile('Y:/',ffile,fss,start)
|
||||
findfile('Z:/',ffile,fss,start)
|
||||
end = time.time()
|
||||
ft = open('PYASF.txt','r')
|
||||
fe = ft.read()
|
||||
ft.close()
|
||||
textPad.insert("insert", '''
|
||||
尋找結果: '''+'''
|
||||
============================================================================
|
||||
|
||||
'''+str(fe)+'''============================================================================
|
||||
總共耗時: '''+str(end - start)+''' 秒''')
|
||||
os.remove('PYASF.txt')
|
||||
except:
|
||||
pass
|
||||
|
||||
def findfile(path,ffile,fss,start):
|
||||
textPad.delete(1.0,END)
|
||||
try:
|
||||
textPad.insert("insert", '正在尋找: '+str(path))
|
||||
for fd in os.listdir(path):
|
||||
root.update()
|
||||
fullpath = os.path.join(path,fd)
|
||||
if os.path.isdir(fullpath):
|
||||
#print('正在掃描: ',fullpath)
|
||||
findfile(fullpath,ffile,fss,start)
|
||||
else:
|
||||
fss = fss + 1
|
||||
if ffile in str(fd):
|
||||
date = time.ctime(os.path.getmtime(fullpath))
|
||||
#try:
|
||||
#f = open(fullpath, 'r')
|
||||
#text = f.readline()
|
||||
#f.close()
|
||||
#print('預覽內容: '+text)
|
||||
#except:
|
||||
#print('預覽內容: ✖錯誤,這個檔案不支援預覽')
|
||||
ft = open('PYASF.txt','a')
|
||||
ft.write('''找到檔案: '''+str(fullpath)+'''
|
||||
建立日期: '''+str(date)+'''
|
||||
|
||||
''')
|
||||
ft.close()
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
|
||||
#scan(filepath)
|
||||
#scan_md5(filepath)
|
||||
#scan_sha256(filepath)
|
||||
#ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa.exe
|
||||
def pyae_file_scan(file):
|
||||
if scan_md5(file):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
#if scan(file) or scan_sha256(file) or scan_md5(file):
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
at_list_winf = ['CreateFileW',
|
||||
'DeleteFileW',
|
||||
'FindExistFileW',
|
||||
'FindNextFileW',
|
||||
'ReadFile',
|
||||
'WriteFile',
|
||||
'MapViewOfFile',
|
||||
'SetFilePointer',
|
||||
'CreateDirectoryW',
|
||||
'FindClose',
|
||||
'SetWindowHookEx',
|
||||
'ExitProcess',
|
||||
'GetCurrentProcess',
|
||||
'GetProcessHeap',
|
||||
'OpenProcess',
|
||||
'IsDebuggerPresent',
|
||||
'CreateThread',
|
||||
'GetCurrentThread',
|
||||
'GetModuleHandleW',
|
||||
'BeginDeferWindowPos',
|
||||
'CreateDialogParaW',
|
||||
'CreateWindowExW',
|
||||
'GetWindowLongW',
|
||||
'GetWindowRect',
|
||||
'GetWindowTextW',
|
||||
'InvalidRect',
|
||||
'SetWindowTextW',
|
||||
'ShowWindow',
|
||||
'RegisterClassExW',
|
||||
'RegisterHotKey',
|
||||
'RegOpenKeyExW',
|
||||
'RegOpenCurrentUser',
|
||||
'RegSetValueExW',
|
||||
'MessageBoxW']
|
||||
|
||||
ai_list_file = ['CreateFileW'
|
||||
'DeleteFileW'
|
||||
'FindExistFileW'
|
||||
'FindNextFileW'
|
||||
'ReadFile'
|
||||
'WriteFile'
|
||||
'MapViewOfFile'
|
||||
'SetFilePointer'
|
||||
'CreateDirectoryW'
|
||||
'FindClose'
|
||||
'GetModuleHandleW']
|
||||
|
||||
ai_list_process = ['ExitProcess',
|
||||
'GetCurrentProcess',
|
||||
'GetProcessHeap',
|
||||
'OpenProcess']
|
||||
|
||||
ai_list_Antidebug = ['IsDebuggerPresent']
|
||||
|
||||
ai_list_thread = ['CreateThread',
|
||||
'GetCurrentThread']
|
||||
|
||||
ai_list_windows = ['MessageBoxW',
|
||||
'BeginDeferWindowPos',
|
||||
'CreateDialogParaW',
|
||||
'CreateWindowExW',
|
||||
'GetWindowLongW',
|
||||
'GetWindowRect',
|
||||
'GetWindowTextW',
|
||||
'InvalidRect'
|
||||
'SetWindowTextW'
|
||||
'ShowWindow']
|
||||
|
||||
ai_list_regkey = ['RegisterClassExW'
|
||||
'RegisterHotKey',
|
||||
'RegOpenKeyExW',
|
||||
'RegOpenCurrentUser',
|
||||
'RegSetValueExW']
|
||||
|
||||
ai_list_hook = ['SetWindowHookEx']
|
||||
|
||||
at = 34
|
||||
t = 35
|
||||
ti = 35
|
||||
@@ -1,8 +1,8 @@
|
||||
####################################################################################
|
||||
# Coding Python 3 UTF-8 (Python IDLE)
|
||||
#
|
||||
# PYAS Ver: PYAS V2.1.6 (2020.12.17)
|
||||
# PYAE Ver: PYAS V1.2.3 (2022.03.04)
|
||||
# PYAS Ver: PYAS V2.2.0 (2020.12.17)
|
||||
# PYAE Ver: PYAE V1.2.4 (2022.03.04)
|
||||
# Support: Windows 7,8,10,11 64-bit
|
||||
#
|
||||
# PYAS Git: https://github.com/87owo/PYAS
|
||||
@@ -14,8 +14,8 @@
|
||||
####################################################################################
|
||||
|
||||
#版本資訊
|
||||
pyas_virsion = '2.1.6'
|
||||
pyae_virsion = '1.2.3'
|
||||
pyas_version = '2.2.0'
|
||||
pyae_version = '1.2.4'
|
||||
dev_edition_times = 0
|
||||
pyas_copyright = 'Copyright© 2020-2022 PYAS Python Antivirus Software.'
|
||||
pyas_legal_copyright = 'Copyright© 2020-2022 PYAS'
|
||||
@@ -27,7 +27,7 @@ pyas_legal_copyright = 'Copyright© 2020-2022 PYAS'
|
||||
import pyinstaller_versionfile
|
||||
pyinstaller_versionfile.create_versionfile(
|
||||
output_file="versionfile.txt",
|
||||
version=pyas_virsion,
|
||||
version=pyas_version,
|
||||
company_name="PYAS",
|
||||
file_description="Python Antivirus Software",
|
||||
internal_name="PYAS",
|
||||
@@ -88,7 +88,7 @@ pyas_divider = '='*80
|
||||
|
||||
#載入模組套件
|
||||
try:
|
||||
import os, time, sys, psutil, socket, subprocess, binascii, platform, cryptocode, webbrowser, requests, threading, pygame, pathlib
|
||||
import os, time, sys, psutil, socket, subprocess, binascii, platform, cryptocode, webbrowser, requests, threading, pygame, pathlib, virustotal_python
|
||||
from cv2 import VideoCapture
|
||||
from ctypes import windll
|
||||
import requests as req
|
||||
@@ -96,6 +96,7 @@ try:
|
||||
from hashlib import md5
|
||||
from tkinter import messagebox, filedialog
|
||||
from tkinter import *
|
||||
#from pprint import pprint
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
@@ -103,7 +104,7 @@ except Exception as e:
|
||||
|
||||
#載入窗口介面
|
||||
root = Tk()
|
||||
root.title('PYAS V'+pyas_virsion)
|
||||
root.title('PYAS V'+pyas_version)
|
||||
sx,sy = root.winfo_screenwidth(),root.winfo_screenheight()
|
||||
root.geometry('800x450+'+str(int(sx/2-400))+'+'+str(int(sy/2-225)))
|
||||
textPad=Text(root,undo=True)
|
||||
@@ -119,8 +120,11 @@ group.pack(anchor='e')
|
||||
|
||||
#觀迎使用
|
||||
en_welcome = '''Welcome To Python Antivirus Software !!!
|
||||
|
||||
========================================
|
||||
Language: Setting > Change Language
|
||||
Update: Setting > Software Settings
|
||||
========================================
|
||||
PYAS Version: 2.2.0, PYAE Version: 1.2.4
|
||||
'''#Help Info: About > PYAS Help
|
||||
|
||||
####################################################################################
|
||||
@@ -173,19 +177,26 @@ def pyas_scan_write_en(file):
|
||||
fe = ft.write(file+'\n')
|
||||
ft.close()
|
||||
|
||||
def pyas_scan_write_d_en(file):
|
||||
ft = open('Library/PYAS/Temp/PYASD.tmp','a',encoding='utf-8')
|
||||
fe = ft.write(file+'\n')
|
||||
ft.close()
|
||||
|
||||
#定義讀取紀錄
|
||||
def pyas_scan_read_en():
|
||||
try:
|
||||
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
|
||||
fe = ft.read()
|
||||
lines = ft.readlines()
|
||||
ft.close()
|
||||
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
|
||||
lines = len(ft.readlines())
|
||||
ft.close()
|
||||
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()
|
||||
return en_virus_true+'\n'+pyas_divider+'\n'+fe###
|
||||
return en_virus_true+' ('+str(lines)+' items)'+'\n'+pyas_divider+'\n'+fe###
|
||||
except:
|
||||
pygame.mixer.init()
|
||||
pygame.mixer.music.set_volume(1.0)
|
||||
@@ -213,7 +224,10 @@ def pyas_scan_answer_en():
|
||||
pyas_clear()
|
||||
root.update()
|
||||
textPad.insert("insert", 'Deleting:'+'\n'+pyas_divider+'\n'+str(line))
|
||||
os.remove(str(line[:-1]))
|
||||
try:
|
||||
os.remove(str(line[:-1]))
|
||||
except:
|
||||
continue
|
||||
else:
|
||||
pass
|
||||
pyas_clear()
|
||||
@@ -235,7 +249,7 @@ def pyas_scan_answer_en():
|
||||
#定義更新選項
|
||||
def software_update_en():
|
||||
pyas_clear()
|
||||
webbrowser.open('https://xiaomi69ai.wixsite.com/pyas')
|
||||
webbrowser.open('https://xiaomi69ai.wixsite.com/pyas?lang=en')
|
||||
|
||||
def engine_update_en():
|
||||
if messagebox.askokcancel('Warning','Update Antivirus Engine ,Do You want to continue?', default="cancel", icon="warning"):
|
||||
@@ -264,7 +278,7 @@ def pyas_scan_start(file,rfp):
|
||||
readable_hash = md5(bytes).hexdigest();
|
||||
if str(readable_hash) in str(rfp):
|
||||
virus_found = True
|
||||
f.close()
|
||||
f.close()
|
||||
if not virus_found:
|
||||
return False
|
||||
else:
|
||||
@@ -334,6 +348,45 @@ def pyas_protect_init_en():
|
||||
#pyas_protect_init_en()
|
||||
####################################################################################
|
||||
|
||||
def input_virustotal_scan_en():
|
||||
pyas_clear()
|
||||
t=Toplevel(root)
|
||||
t.title('Virustotal Api Key')
|
||||
t.geometry('260x40')
|
||||
t.transient(root)
|
||||
Label(t,text=' KEY: ').grid(row=0,column=0,sticky='e')
|
||||
v=StringVar()
|
||||
e=Entry(t,width=20,textvariable=v)
|
||||
e.grid(row=0,column=1,padx=2,pady=2,sticky='we')
|
||||
e.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='OK',command=lambda :virustotal_scan_en(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
|
||||
|
||||
def virustotal_scan_en(key):
|
||||
pyas_clear()
|
||||
file = filedialog.askopenfilename()
|
||||
if file != '':
|
||||
try:
|
||||
with open(file,"rb") as f:
|
||||
bytes = f.read()
|
||||
readable_hash = md5(bytes).hexdigest();
|
||||
# The ID (either SHA-256, SHA-1 or MD5 hash) identifying the file
|
||||
FILE_ID = str(readable_hash)
|
||||
with virustotal_python.Virustotal(key) as vtotal:
|
||||
resp = vtotal.request(f"files/{FILE_ID}")
|
||||
FILE_ID = resp.data["id"]
|
||||
webbrowser.open('https://www.virustotal.com/gui/file/'+str(FILE_ID))
|
||||
f.close()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
else:
|
||||
pyas_clear()
|
||||
textPad.insert("insert", none_file_en+'\n')
|
||||
|
||||
#virustotal_scan()
|
||||
####################################################################################
|
||||
|
||||
#定義智能掃描
|
||||
def pyas_scan_smart_en():
|
||||
pyas_clear()
|
||||
@@ -367,24 +420,27 @@ def pyas_file_scan_en():
|
||||
pyas_scan_write_en(file)
|
||||
textPad.insert("insert", en_virus_true+'\n')
|
||||
else:
|
||||
fts = 0
|
||||
pe = PE(file)
|
||||
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:
|
||||
pyas_scan_write_en(file)
|
||||
try:
|
||||
fts = 0
|
||||
textPad.insert("insert", en_virus_true+'\n')
|
||||
pe = PE(file)
|
||||
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:
|
||||
pyas_scan_write_en(file)
|
||||
fts = 0
|
||||
textPad.insert("insert", en_virus_true+'\n')
|
||||
except:
|
||||
pass
|
||||
fp.close()
|
||||
fn.close()
|
||||
pyas_scan_answer_en()
|
||||
else:
|
||||
pyas_clear()
|
||||
textPad.insert("insert", none_file_en+'\n')
|
||||
|
||||
#pyas_file_scan_en()
|
||||
####################################################################################
|
||||
|
||||
#定義路徑掃描
|
||||
@@ -420,21 +476,24 @@ def pyas_scan_path_en(path,rfp,rfn,fts):
|
||||
if os.path.isdir(fullpath):
|
||||
pyas_scan_path_en(fullpath,rfp,rfn,fts)
|
||||
else:
|
||||
if '.exe' in str(fd) or '.EXE' in str(fd):
|
||||
if 1:#'.exe' in str(fd) or '.EXE' 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:
|
||||
pe = PE(fullpath)
|
||||
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:
|
||||
pyas_scan_write_en(str(fullpath))
|
||||
fts = 0
|
||||
try:
|
||||
pe = PE(fullpath)
|
||||
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:
|
||||
pyas_scan_write_en(str(fullpath))
|
||||
fts = 0
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
textPad.delete(1.0,END)
|
||||
textPad.insert("insert", en_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
||||
@@ -741,7 +800,7 @@ def find_files_info_en(ffile):
|
||||
findfile_en('Y:/',ffile,fss,start)
|
||||
findfile_en('Z:/',ffile,fss,start)
|
||||
end = time.time()
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','r')
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','r',encoding='utf-8')
|
||||
fe = ft.read()
|
||||
ft.close()
|
||||
pyas_clear()
|
||||
@@ -763,7 +822,7 @@ def findfile_en(path,ffile,fss,start):
|
||||
fss = fss + 1
|
||||
if ffile in str(fd):
|
||||
date = time.ctime(os.path.getmtime(fullpath))
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','a')
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','a',encoding='utf-8')
|
||||
ft.write('File found: '+str(fullpath)+'\n'+'Create date: '+str(date)+'\n'+'\n')
|
||||
ft.close()
|
||||
continue
|
||||
@@ -957,11 +1016,11 @@ def input_send_text_en():
|
||||
e3.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='OK',command=lambda :send_text(e.get(),e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
Button(t,text='OK',command=lambda :send_text_en(e.get(),e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
else:
|
||||
pass
|
||||
|
||||
def send_text(message,HOST,PORT):
|
||||
def send_text_en(message,HOST,PORT):
|
||||
pyas_clear()
|
||||
try:
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
@@ -989,11 +1048,11 @@ def input_receive_text_en():
|
||||
e3.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='OK',command=lambda :receive_text(e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
Button(t,text='OK',command=lambda :receive_text_en(e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
else:
|
||||
pass
|
||||
|
||||
def receive_text(HOST,PORT):
|
||||
def receive_text_en(HOST,PORT):
|
||||
pyas_clear()
|
||||
max_connect = 5
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
@@ -1059,6 +1118,7 @@ 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()
|
||||
|
||||
################################################################################
|
||||
|
||||
#關於
|
||||
@@ -1085,8 +1145,8 @@ 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.6
|
||||
PYAE Version: 1.2.3
|
||||
PYAS Version: 2.2.0
|
||||
PYAE Version: 1.2.4
|
||||
Special Thanks: Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
|
||||
Thanks For Using PYAS Python Antivirus Software'''
|
||||
pygame.mixer.init()
|
||||
@@ -1110,11 +1170,11 @@ Copyright© 2020-2022 PYAS Python Antivirus Software''')
|
||||
#about_pyas_en()
|
||||
def software_version_en():
|
||||
pyas_clear()
|
||||
messagebox.showinfo('Version','''Software Version: '''+pyas_virsion)
|
||||
messagebox.showinfo('Version','''Software Version: '''+pyas_version)
|
||||
|
||||
def engine_version_en():
|
||||
pyas_clear()
|
||||
messagebox.showinfo('Version','''Engine Version: '''+pyae_virsion)
|
||||
messagebox.showinfo('Version','''Engine Version: '''+pyae_version)
|
||||
|
||||
####################################################################################
|
||||
|
||||
@@ -1193,6 +1253,8 @@ def english():
|
||||
devmenu.add_command(label = 'Analyze EXE Hashes',command = exe_analyze_md5_en)
|
||||
devmenu.add_command(label = 'Analyze EXE Bytes',command = exe_analyze_file_en)
|
||||
devmenu.add_command(label = 'Analyze EXE Function',command = exe_analyze_function_en)
|
||||
devmenu.add_separator()
|
||||
devmenu.add_command(label = 'Online File Analyze',command = input_virustotal_scan_en)
|
||||
#devmenu.add_separator()
|
||||
#devmenu.add_command(label = 'Install Win10 System',command = install_windows10_en)
|
||||
#devmenu.add_command(label = 'Install Win11 System',command = install_windows11_en)
|
||||
@@ -1238,7 +1300,7 @@ Error Info: '''+str(e))
|
||||
|
||||
#定義防護
|
||||
def protect_threading_init_zh():
|
||||
if messagebox.askokcancel('Warning','''啟動實時防護需要 4GB 以上的 RAM,是否繼續?''', default="cancel", icon="warning"):
|
||||
if messagebox.askokcancel('Warning','''啟動實時防護需要 4GB 以上的記憶體,是否繼續?''', default="cancel", icon="warning"):
|
||||
pyas_clear()
|
||||
textPad.insert("insert", zh_init_file)
|
||||
root.update()
|
||||
@@ -1309,12 +1371,15 @@ def pyas_scan_read_zh():
|
||||
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
|
||||
fe = ft.read()
|
||||
ft.close()
|
||||
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
|
||||
lines = len(ft.readlines())
|
||||
ft.close()
|
||||
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()
|
||||
return zh_virus_true+'\n'+pyas_divider+'\n'+fe
|
||||
return zh_virus_true+' ('+str(lines)+' 項)'+'\n'+pyas_divider+'\n'+fe
|
||||
except:
|
||||
pygame.mixer.init()
|
||||
pygame.mixer.music.set_volume(1.0)
|
||||
@@ -1342,7 +1407,10 @@ def pyas_scan_answer_zh():
|
||||
pyas_clear()
|
||||
root.update()
|
||||
textPad.insert("insert", '正在移除:'+'\n'+pyas_divider+'\n'+str(line))
|
||||
os.remove(str(line[:-1]))
|
||||
try:
|
||||
os.remove(str(line[:-1]))
|
||||
except:
|
||||
continue
|
||||
else:
|
||||
pass
|
||||
pyas_clear()
|
||||
@@ -1384,22 +1452,41 @@ def engine_update_zh():
|
||||
|
||||
####################################################################################
|
||||
|
||||
#定義開始掃描
|
||||
def pyas_scan_start(file,rfp):
|
||||
try:
|
||||
virus_found = False
|
||||
with open(file,"rb") as f:
|
||||
bytes = f.read()
|
||||
readable_hash = md5(bytes).hexdigest();
|
||||
if str(readable_hash) in str(rfp):
|
||||
virus_found = True
|
||||
f.close()
|
||||
if not virus_found:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
except:
|
||||
pass
|
||||
def input_virustotal_scan_zh():
|
||||
pyas_clear()
|
||||
t=Toplevel(root)
|
||||
t.title('Virustotal Api Key')
|
||||
t.geometry('260x40')
|
||||
t.transient(root)
|
||||
Label(t,text=' 密鑰: ').grid(row=0,column=0,sticky='e')
|
||||
v=StringVar()
|
||||
e=Entry(t,width=20,textvariable=v)
|
||||
e.grid(row=0,column=1,padx=2,pady=2,sticky='we')
|
||||
e.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='確定',command=lambda :virustotal_scan_zh(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
|
||||
|
||||
def virustotal_scan_zh(key):
|
||||
pyas_clear()
|
||||
file = filedialog.askopenfilename()
|
||||
if file != '':
|
||||
try:
|
||||
with open(file,"rb") as f:
|
||||
bytes = f.read()
|
||||
readable_hash = md5(bytes).hexdigest();
|
||||
# The ID (either SHA-256, SHA-1 or MD5 hash) identifying the file
|
||||
FILE_ID = str(readable_hash)
|
||||
with virustotal_python.Virustotal(key) as vtotal:
|
||||
resp = vtotal.request(f"files/{FILE_ID}")
|
||||
FILE_ID = resp.data["id"]
|
||||
webbrowser.open('https://www.virustotal.com/gui/file/'+str(FILE_ID))
|
||||
f.close()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
else:
|
||||
pyas_clear()
|
||||
textPad.insert("insert", none_file_zh+'\n')
|
||||
|
||||
####################################################################################
|
||||
|
||||
@@ -1440,17 +1527,20 @@ def pyas_file_scan_zh():
|
||||
pyas_scan_write_zh(file)
|
||||
textPad.insert("insert", zh_virus_true+'\n')
|
||||
else:
|
||||
fts = 0
|
||||
pe = PE(file)
|
||||
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:
|
||||
pyas_scan_write_zh(file)
|
||||
try:
|
||||
fts = 0
|
||||
textPad.insert("insert", zh_virus_true+'\n')
|
||||
pe = PE(file)
|
||||
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:
|
||||
pyas_scan_write_zh(file)
|
||||
fts = 0
|
||||
textPad.insert("insert", zh_virus_true+'\n')
|
||||
except:
|
||||
pass
|
||||
fp.close()
|
||||
fn.close()
|
||||
pyas_scan_answer_zh()
|
||||
@@ -1493,21 +1583,24 @@ def pyas_scan_path_zh(path,rfp,rfn,fts):
|
||||
if os.path.isdir(fullpath):
|
||||
pyas_scan_path_zh(fullpath,rfp,rfn,fts)
|
||||
else:
|
||||
if '.exe' in str(fd) or '.EXE' in str(fd):
|
||||
if 1:#'.exe' in str(fd) or '.EXE' 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:
|
||||
pe = PE(fullpath)
|
||||
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:
|
||||
pyas_scan_write_zh(str(fullpath))
|
||||
fts = 0
|
||||
try:
|
||||
pe = PE(fullpath)
|
||||
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:
|
||||
pyas_scan_write_zh(str(fullpath))
|
||||
fts = 0
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
textPad.delete(1.0,END)
|
||||
textPad.insert("insert", zh_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
||||
@@ -1815,7 +1908,7 @@ def find_files_info_zh(ffile):
|
||||
findfile_zh('Y:/',ffile,fss,start)
|
||||
findfile_zh('Z:/',ffile,fss,start)
|
||||
end = time.time()
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','r')
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','r',encoding='utf-8')
|
||||
fe = ft.read()
|
||||
ft.close()
|
||||
pyas_clear()
|
||||
@@ -1837,13 +1930,14 @@ def findfile_zh(path,ffile,fss,start):
|
||||
fss = fss + 1
|
||||
if ffile in str(fd):
|
||||
date = time.ctime(os.path.getmtime(fullpath))
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','a')
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','a',encoding='utf-8')
|
||||
ft.write('找到檔案: '+str(fullpath)+'\n'+'創建日期: '+str(date)+'\n'+'\n')
|
||||
ft.close()
|
||||
continue
|
||||
except:
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
|
||||
#find_files_init_zh()
|
||||
def repair_system_files_zh():
|
||||
pyas_clear()
|
||||
if messagebox.askokcancel('Warning','''這個功能需要花費一些時間,是否繼續?''', default="cancel", icon="warning"):
|
||||
@@ -1887,7 +1981,7 @@ def input_custom_cmd_command_zh():
|
||||
t.title('自訂指令')
|
||||
t.geometry('260x40')
|
||||
t.transient(root)
|
||||
Label(t,text=' CMD: ').grid(row=0,column=0,sticky='e')
|
||||
Label(t,text=' 指令: ').grid(row=0,column=0,sticky='e')
|
||||
v=StringVar()
|
||||
e=Entry(t,width=20,textvariable=v)
|
||||
e.grid(row=0,column=1,padx=2,pady=2,sticky='we')
|
||||
@@ -1913,22 +2007,22 @@ def input_custom_regedit_command_zh():
|
||||
t.title('自訂指令')
|
||||
t.geometry('260x110')
|
||||
t.transient(root)
|
||||
Label(t,text=' Path: ').grid(row=0,column=0,sticky='e')
|
||||
Label(t,text=' 路徑: ').grid(row=0,column=0,sticky='e')
|
||||
v=StringVar()
|
||||
e=Entry(t,width=20,textvariable=v)
|
||||
e.grid(row=0,column=1,padx=2,pady=2,sticky='we')
|
||||
e.focus_set()
|
||||
Label(t,text=' Name: ').grid(row=1,column=0,sticky='e')
|
||||
Label(t,text=' 名稱: ').grid(row=1,column=0,sticky='e')
|
||||
v2=StringVar()
|
||||
e2=Entry(t,width=20,textvariable=v2)
|
||||
e2.grid(row=1,column=1,padx=2,pady=2,sticky='we')
|
||||
e2.focus_set()
|
||||
Label(t,text=' Type: ').grid(row=2,column=0,sticky='e')
|
||||
Label(t,text=' 類型: ').grid(row=2,column=0,sticky='e')
|
||||
v3=StringVar()
|
||||
e3=Entry(t,width=20,textvariable=v3)
|
||||
e3.grid(row=2,column=1,padx=2,pady=2,sticky='we')
|
||||
e3.focus_set()
|
||||
Label(t,text=' Num: ').grid(row=3,column=0,sticky='e')
|
||||
Label(t,text=' 數值: ').grid(row=3,column=0,sticky='e')
|
||||
v4=StringVar()
|
||||
e4=Entry(t,width=20,textvariable=v4)
|
||||
e4.grid(row=3,column=1,padx=2,pady=2,sticky='we')
|
||||
@@ -2031,11 +2125,11 @@ def input_send_text_zh():
|
||||
e3.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='確定',command=lambda :send_text(e.get(),e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
Button(t,text='確定',command=lambda :send_text_zh(e.get(),e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
else:
|
||||
pass
|
||||
|
||||
def send_text(message,HOST,PORT):
|
||||
def send_text_zh(message,HOST,PORT):
|
||||
pyas_clear()
|
||||
try:
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
@@ -2063,11 +2157,11 @@ def input_receive_text_zh():
|
||||
e3.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='確定',command=lambda :receive_text(e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
Button(t,text='確定',command=lambda :receive_text_zh(e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
else:
|
||||
pass
|
||||
|
||||
def receive_text(HOST,PORT):
|
||||
def receive_text_zh(HOST,PORT):
|
||||
pyas_clear()
|
||||
max_connect = 5
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
@@ -2164,8 +2258,8 @@ def about_pyas_zh():
|
||||
官方GIT: https://github.com/87owo/PYAS
|
||||
官方網站: https://xiaomi69ai.wixsite.com/pyas
|
||||
創立日期: 2020/12/17
|
||||
PYAS 版本: 2.1.6
|
||||
PYAE 版本: 1.2.3
|
||||
PYAS 版本: 2.2.0
|
||||
PYAE 版本: 1.2.4
|
||||
特別感謝: Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
|
||||
感謝您使用 PYAS 防毒軟體'''
|
||||
pygame.mixer.init()
|
||||
@@ -2189,11 +2283,11 @@ PYAE 版本: 1.2.3
|
||||
|
||||
def software_version_zh():
|
||||
pyas_clear()
|
||||
messagebox.showinfo('Version','''防毒軟體版本: '''+pyas_virsion)
|
||||
messagebox.showinfo('Version','''防毒軟體版本: '''+pyas_version)
|
||||
|
||||
def engine_version_zh():
|
||||
pyas_clear()
|
||||
messagebox.showinfo('Version','''掃毒引擎版本: '''+pyae_virsion)
|
||||
messagebox.showinfo('Version','''掃毒引擎版本: '''+pyae_version)
|
||||
|
||||
####################################################################################
|
||||
|
||||
@@ -2271,6 +2365,8 @@ def traditional_chinese():
|
||||
devmenu.add_command(label = '分析 EXE 哈希',command = exe_analyze_md5_zh)
|
||||
devmenu.add_command(label = '分析 EXE 位元',command = exe_analyze_file_zh)
|
||||
devmenu.add_command(label = '分析 EXE 函數',command = exe_analyze_function_zh)
|
||||
devmenu.add_separator()
|
||||
devmenu.add_command(label = '線上檔案分析',command = input_virustotal_scan_zh)
|
||||
#devmenu.add_separator()
|
||||
#devmenu.add_command(label = '重灌 Win10 系統',command = install_windows10_zh)
|
||||
#devmenu.add_command(label = '重灌 Win11 系統',command = install_windows11_zh)
|
||||
@@ -2387,12 +2483,15 @@ def pyas_scan_read_cn():
|
||||
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
|
||||
fe = ft.read()
|
||||
ft.close()
|
||||
ft = open('Library/PYAS/Temp/PYASV.tmp','r',encoding='utf-8')
|
||||
lines = len(ft.readlines())
|
||||
ft.close()
|
||||
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()
|
||||
return cn_virus_true+'\n'+pyas_divider+'\n'+fe
|
||||
return cn_virus_true+' ('+str(lines)+' 项)'+'\n'+pyas_divider+'\n'+fe
|
||||
except:
|
||||
pygame.mixer.init()
|
||||
pygame.mixer.music.set_volume(1.0)
|
||||
@@ -2420,7 +2519,10 @@ def pyas_scan_answer_cn():
|
||||
pyas_clear()
|
||||
root.update()
|
||||
textPad.insert("insert", '正在移除:'+'\n'+pyas_divider+'\n'+str(line))
|
||||
os.remove(str(line[:-1]))
|
||||
try:
|
||||
os.remove(str(line[:-1]))
|
||||
except:
|
||||
continue
|
||||
else:
|
||||
pass
|
||||
pyas_clear()
|
||||
@@ -2462,22 +2564,41 @@ def engine_update_cn():
|
||||
|
||||
####################################################################################
|
||||
|
||||
#定義開始掃描
|
||||
def pyas_scan_start(file,rfp):
|
||||
try:
|
||||
virus_found = False
|
||||
with open(file,"rb") as f:
|
||||
bytes = f.read()
|
||||
readable_hash = md5(bytes).hexdigest();
|
||||
if str(readable_hash) in str(rfp):
|
||||
virus_found = True
|
||||
f.close()
|
||||
if not virus_found:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
except:
|
||||
pass
|
||||
def input_virustotal_scan_cn():
|
||||
pyas_clear()
|
||||
t=Toplevel(root)
|
||||
t.title('Virustotal Api Key')
|
||||
t.geometry('260x40')
|
||||
t.transient(root)
|
||||
Label(t,text=' 密钥: ').grid(row=0,column=0,sticky='e')
|
||||
v=StringVar()
|
||||
e=Entry(t,width=20,textvariable=v)
|
||||
e.grid(row=0,column=1,padx=2,pady=2,sticky='we')
|
||||
e.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='确定',command=lambda :virustotal_scan_cn(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
|
||||
|
||||
def virustotal_scan_cn(key):
|
||||
pyas_clear()
|
||||
file = filedialog.askopenfilename()
|
||||
if file != '':
|
||||
try:
|
||||
with open(file,"rb") as f:
|
||||
bytes = f.read()
|
||||
readable_hash = md5(bytes).hexdigest();
|
||||
# The ID (either SHA-256, SHA-1 or MD5 hash) identifying the file
|
||||
FILE_ID = str(readable_hash)
|
||||
with virustotal_python.Virustotal(key) as vtotal:
|
||||
resp = vtotal.request(f"files/{FILE_ID}")
|
||||
FILE_ID = resp.data["id"]
|
||||
webbrowser.open('https://www.virustotal.com/gui/file/'+str(FILE_ID))
|
||||
f.close()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
else:
|
||||
pyas_clear()
|
||||
textPad.insert("insert", none_file_cn+'\n')
|
||||
|
||||
####################################################################################
|
||||
|
||||
@@ -2518,17 +2639,20 @@ def pyas_file_scan_cn():
|
||||
pyas_scan_write_cn(file)
|
||||
textPad.insert("insert", cn_virus_true+'\n')
|
||||
else:
|
||||
fts = 0
|
||||
pe = PE(file)
|
||||
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:
|
||||
pyas_scan_write_cn(file)
|
||||
try:
|
||||
fts = 0
|
||||
textPad.insert("insert", cn_virus_true+'\n')
|
||||
pe = PE(file)
|
||||
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:
|
||||
pyas_scan_write_cn(file)
|
||||
fts = 0
|
||||
textPad.insert("insert", cn_virus_true+'\n')
|
||||
except:
|
||||
pass
|
||||
fp.close()
|
||||
fn.close()
|
||||
pyas_scan_answer_cn()
|
||||
@@ -2571,21 +2695,24 @@ def pyas_scan_path_cn(path,rfp,rfn,fts):
|
||||
if os.path.isdir(fullpath):
|
||||
pyas_scan_path_cn(fullpath,rfp,rfn,fts)
|
||||
else:
|
||||
if '.exe' in str(fd) or '.EXE' in str(fd):
|
||||
if 1:#'.exe' in str(fd) or '.EXE' in str(fd):
|
||||
textPad.delete(1.0,END)
|
||||
textPad.insert("insert", cn_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
||||
if pyas_scan_start(fullpath,rfp):
|
||||
pyas_scan_write_cn(fullpath)
|
||||
else:
|
||||
pe = PE(fullpath)
|
||||
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:
|
||||
pyas_scan_write_cn(str(fullpath))
|
||||
fts = 0
|
||||
try:
|
||||
pe = PE(fullpath)
|
||||
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:
|
||||
pyas_scan_write_cn(str(fullpath))
|
||||
fts = 0
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
textPad.delete(1.0,END)
|
||||
textPad.insert("insert", cn_scaning+'\n'+pyas_divider+'\n'+fullpath)
|
||||
@@ -2893,7 +3020,7 @@ def find_files_info_cn(ffile):
|
||||
findfile_cn('Y:/',ffile,fss,start)
|
||||
findfile_cn('Z:/',ffile,fss,start)
|
||||
end = time.time()
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','r')
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','r',encoding='utf-8')
|
||||
fe = ft.read()
|
||||
ft.close()
|
||||
pyas_clear()
|
||||
@@ -2915,7 +3042,7 @@ def findfile_cn(path,ffile,fss,start):
|
||||
fss = fss + 1
|
||||
if ffile in str(fd):
|
||||
date = time.ctime(os.path.getmtime(fullpath))
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','a')
|
||||
ft = open('Library/PYAS/Temp/PYASF.tmp','a',encoding='utf-8')
|
||||
ft.write('找到档案: '+str(fullpath)+'\n'+'创建日期: '+str(date)+'\n'+'\n')
|
||||
ft.close()
|
||||
continue
|
||||
@@ -2965,7 +3092,7 @@ def input_custom_cmd_command_cn():
|
||||
t.title('自订指令')
|
||||
t.geometry('260x40')
|
||||
t.transient(root)
|
||||
Label(t,text=' CMD: ').grid(row=0,column=0,sticky='e')
|
||||
Label(t,text=' 指令: ').grid(row=0,column=0,sticky='e')
|
||||
v=StringVar()
|
||||
e=Entry(t,width=20,textvariable=v)
|
||||
e.grid(row=0,column=1,padx=2,pady=2,sticky='we')
|
||||
@@ -2991,22 +3118,22 @@ def input_custom_regedit_command_cn():
|
||||
t.title('自订指令')
|
||||
t.geometry('260x110')
|
||||
t.transient(root)
|
||||
Label(t,text=' Path: ').grid(row=0,column=0,sticky='e')
|
||||
Label(t,text=' 路径: ').grid(row=0,column=0,sticky='e')
|
||||
v=StringVar()
|
||||
e=Entry(t,width=20,textvariable=v)
|
||||
e.grid(row=0,column=1,padx=2,pady=2,sticky='we')
|
||||
e.focus_set()
|
||||
Label(t,text=' Name: ').grid(row=1,column=0,sticky='e')
|
||||
Label(t,text=' 名称: ').grid(row=1,column=0,sticky='e')
|
||||
v2=StringVar()
|
||||
e2=Entry(t,width=20,textvariable=v2)
|
||||
e2.grid(row=1,column=1,padx=2,pady=2,sticky='we')
|
||||
e2.focus_set()
|
||||
Label(t,text=' Type: ').grid(row=2,column=0,sticky='e')
|
||||
Label(t,text=' 类型: ').grid(row=2,column=0,sticky='e')
|
||||
v3=StringVar()
|
||||
e3=Entry(t,width=20,textvariable=v3)
|
||||
e3.grid(row=2,column=1,padx=2,pady=2,sticky='we')
|
||||
e3.focus_set()
|
||||
Label(t,text=' Num: ').grid(row=3,column=0,sticky='e')
|
||||
Label(t,text=' 数值: ').grid(row=3,column=0,sticky='e')
|
||||
v4=StringVar()
|
||||
e4=Entry(t,width=20,textvariable=v4)
|
||||
e4.grid(row=3,column=1,padx=2,pady=2,sticky='we')
|
||||
@@ -3109,11 +3236,11 @@ def input_send_text_cn():
|
||||
e3.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='确定',command=lambda :send_text(e.get(),e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
Button(t,text='确定',command=lambda :send_text_cn(e.get(),e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
else:
|
||||
pass
|
||||
|
||||
def send_text(message,HOST,PORT):
|
||||
def send_text_cn(message,HOST,PORT):
|
||||
pyas_clear()
|
||||
try:
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
@@ -3141,11 +3268,11 @@ def input_receive_text_cn():
|
||||
e3.focus_set()
|
||||
c=IntVar()
|
||||
fss = 0
|
||||
Button(t,text='确定',command=lambda :receive_text(e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
Button(t,text='确定',command=lambda :receive_text_cn(e2.get(),e3.get())).grid(row=2,column=2,sticky='e'+'w',pady=0)
|
||||
else:
|
||||
pass
|
||||
##
|
||||
def receive_text(HOST,PORT):
|
||||
def receive_text_cn(HOST,PORT):
|
||||
pyas_clear()
|
||||
max_connect = 5
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
@@ -3242,8 +3369,8 @@ def about_pyas_cn():
|
||||
官方GIT: https://github.com/87owo/PYAS
|
||||
官方网站: https://xiaomi69ai.wixsite.com/pyas
|
||||
创立日期: 2020/12/17
|
||||
PYAS 版本: 2.1.6
|
||||
PYAE 版本: 1.2.3
|
||||
PYAS 版本: 2.2.0
|
||||
PYAE 版本: 1.2.4
|
||||
特别感谢: Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
|
||||
感谢您使用 PYAS 防毒软件'''
|
||||
pygame.mixer.init()
|
||||
@@ -3267,11 +3394,11 @@ PYAE 版本: 1.2.3
|
||||
|
||||
def software_version_cn():
|
||||
pyas_clear()
|
||||
messagebox.showinfo('Version','''防毒软件版本: '''+pyas_virsion)
|
||||
messagebox.showinfo('Version','''防毒软件版本: '''+pyas_version)
|
||||
|
||||
def engine_version_cn():
|
||||
pyas_clear()
|
||||
messagebox.showinfo('Version','''扫毒引擎版本: '''+pyae_virsion)
|
||||
messagebox.showinfo('Version','''扫毒引擎版本: '''+pyae_version)
|
||||
|
||||
###########################################################################################################################################################################################
|
||||
|
||||
@@ -3316,7 +3443,7 @@ def simplified_chinese():
|
||||
filemenu3.add_cascade(label='隐私工具', menu=insmenu, underline=0)
|
||||
insmenu.add_command(label = '相机隐私检测',command = camera_check_cn)
|
||||
#insmenu.add_command(label = 'Protect Privacy Archives',command = #)
|
||||
insmenu.add_command(label = '移除私密檔案',command = destroy_files_cn)
|
||||
insmenu.add_command(label = '移除私密档案',command = destroy_files_cn)
|
||||
submenu = Menu(filemenu3,tearoff=False)
|
||||
filemenu3.add_cascade(label='更多工具', menu=submenu, underline=0)
|
||||
submenu.add_command(label = '寻找档案',command = find_files_init_cn)
|
||||
@@ -3339,6 +3466,8 @@ def simplified_chinese():
|
||||
devmenu.add_command(label = '分析 EXE 哈希',command = exe_analyze_md5_cn)
|
||||
devmenu.add_command(label = '分析 EXE 位元',command = exe_analyze_file_cn)
|
||||
devmenu.add_command(label = '分析 EXE 函数',command = exe_analyze_function_cn)
|
||||
devmenu.add_separator()
|
||||
devmenu.add_command(label = '在线挡案分析',command = input_virustotal_scan_cn)
|
||||
#devmenu.add_separator()
|
||||
#devmenu.add_command(label = '重灌 Win10 系統',command = install_windows10_zh)
|
||||
#devmenu.add_command(label = '重灌 Win11 系統',command = install_windows11_zh)
|
||||
@@ -3387,21 +3516,25 @@ def pyas_key():
|
||||
pyas_clear()
|
||||
file = './PYAS.exe'
|
||||
if file != '':
|
||||
with open(file,"rb") as f:
|
||||
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:
|
||||
setup_pyas()
|
||||
else:
|
||||
try:
|
||||
with open(file,"rb") as f:
|
||||
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:
|
||||
setup_pyas()
|
||||
else:
|
||||
messagebox.showerror('Error', '''The PYAS antivirus software you are using is not genuine. To ensure your safety, please download genuine antivirus software from the
|
||||
Official website: https://xiaomi69ai.wixsite.com/pyas''')
|
||||
except:
|
||||
print('fail')
|
||||
messagebox.showerror('Error', '''The PYAS antivirus software you are using is not genuine. To ensure your safety, please download genuine antivirus software from the
|
||||
Official website: https://xiaomi69ai.wixsite.com/pyas''')
|
||||
else:
|
||||
pyas_clear()
|
||||
|
||||
pass
|
||||
|
||||
####################################################################################
|
||||
|
||||
@@ -3420,7 +3553,7 @@ def setup_pyas():
|
||||
else:
|
||||
english()
|
||||
except Exception as e:
|
||||
#messagebox.showinfo('Welcome',en_welcome)
|
||||
messagebox.showinfo('Welcome',en_welcome)
|
||||
english()
|
||||
try:
|
||||
pyas_key()
|
||||
|
||||
Reference in new issue
Block a user