Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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,7 +1,7 @@
|
||||
####################################################################################
|
||||
# Coding Python 3 UTF-8 (Python IDLE)
|
||||
#
|
||||
# PYAS Ver: PYAS V2.1.6 (2020.12.17)
|
||||
# PYAS Ver: PYAS V2.1.7 (2020.12.17)
|
||||
# PYAE Ver: PYAS V1.2.3 (2022.03.04)
|
||||
# Support: Windows 7,8,10,11 64-bit
|
||||
#
|
||||
@@ -14,7 +14,7 @@
|
||||
####################################################################################
|
||||
|
||||
#版本資訊
|
||||
pyas_virsion = '2.1.6'
|
||||
pyas_virsion = '2.1.7'
|
||||
pyae_virsion = '1.2.3'
|
||||
dev_edition_times = 0
|
||||
pyas_copyright = 'Copyright© 2020-2022 PYAS Python Antivirus Software.'
|
||||
@@ -1085,7 +1085,7 @@ 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
|
||||
PYAS Version: 2.1.7
|
||||
PYAE Version: 1.2.3
|
||||
Special Thanks: Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
|
||||
Thanks For Using PYAS Python Antivirus Software'''
|
||||
@@ -2164,7 +2164,7 @@ def about_pyas_zh():
|
||||
官方GIT: https://github.com/87owo/PYAS
|
||||
官方網站: https://xiaomi69ai.wixsite.com/pyas
|
||||
創立日期: 2020/12/17
|
||||
PYAS 版本: 2.1.6
|
||||
PYAS 版本: 2.1.7
|
||||
PYAE 版本: 1.2.3
|
||||
特別感謝: Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
|
||||
感謝您使用 PYAS 防毒軟體'''
|
||||
@@ -3242,7 +3242,7 @@ def about_pyas_cn():
|
||||
官方GIT: https://github.com/87owo/PYAS
|
||||
官方网站: https://xiaomi69ai.wixsite.com/pyas
|
||||
创立日期: 2020/12/17
|
||||
PYAS 版本: 2.1.6
|
||||
PYAS 版本: 2.1.7
|
||||
PYAE 版本: 1.2.3
|
||||
特别感谢: Wix, Avast, Github, Google, Python, Microsoft, VirusTotal, VirusShare, LenStevens
|
||||
感谢您使用 PYAS 防毒软件'''
|
||||
@@ -3316,7 +3316,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)
|
||||
@@ -3391,12 +3391,17 @@ def pyas_key():
|
||||
bytes = f.read()
|
||||
readable_hash = md5(bytes).hexdigest();
|
||||
f.close()
|
||||
ft = open('./Library/PYAS/Setup/PYAS.key','r')
|
||||
fe = ft.read()
|
||||
ft.close()
|
||||
if fe == readable_hash:
|
||||
setup_pyas()
|
||||
else:
|
||||
try:
|
||||
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:
|
||||
|
||||
Reference in new issue
Block a user