Compare commits

...
9 Commits
Author SHA1 Message Date
87owo 4bde6f22e8 Add files via upload 2022-02-20 17:34:04 +08:00
87owo 6072d2db2d Add files via upload 2022-01-31 11:55:44 +08:00
87owo 2dfa73ba67 Add files via upload 2021-12-03 18:39:36 +08:00
87owo 3d72861627 Delete virustotal.txt 2021-11-26 01:26:36 +08:00
87owo 0980449e99 Add files via upload 2021-11-26 01:26:14 +08:00
87owo 11408e5816 Add files via upload 2021-11-15 18:03:06 +08:00
87owo 12cd3e5ff3 Add files via upload 2021-10-28 07:27:41 +08:00
87owo 2a5182569e Add files via upload 2021-10-28 00:44:13 +08:00
87owo e128d8322c Add files via upload 2021-10-26 08:56:52 +08:00
2 changed files with 448 additions and 50 deletions

No files matched your search

+79
View File
@@ -0,0 +1,79 @@
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
+369 -50
View File
@@ -1,9 +1,11 @@
import os
import cv2
import time
import random
import string
import sys
import ctypes
import psutil
import shutil
import socket
import webbrowser
@@ -14,19 +16,37 @@ import hashlib
import getpass
import json
import stat
import threading
import pyclamd
import zipfile
import platform
import cryptocode
import tkinter as tk
#import pandas as pd
from tkinter import ttk
from tkinter import *
from os import listdir
#import pyinstaller_versionfile
from tkinter import filedialog
from tkinter.messagebox import *
from functools import partial
from os.path import isfile, isdir, join
from Expansion_pack.list import *
from Expansion_pack import *
'''
pyinstaller_versionfile.create_versionfile(
output_file="versionfile.txt",
version="1.8.1",
company_name="PYAS",
file_description="Python Antivirus Software",
internal_name="PYAS",
legal_copyright="Copyright© 2020-2022 PYAS Python Antivirus Software.",
original_filename="PYAS.exe",
product_name="PYAS"
)
'''
root = Tk()
root.title('PYAS V1.6')
root.title('PYAS V1.8.1')
#root.resizable(0,0)
root.geometry('800x450')
textPad=Text(root,undo=True)
@@ -35,10 +55,37 @@ scroll=Scrollbar(textPad)
textPad.config(yscrollcommand=scroll.set)
scroll.config(command=textPad.yview)
scroll.pack(side=RIGHT,fill=Y)
group = Label(root, text="Copyright© 2020-2021 PYAS Python Antivirus Software",padx=5, pady=2)
group = Label(root, text="Copyright© 2020-2022 PYAS Python Antivirus Software",padx=5, pady=2)
group.pack(anchor='e')
def pyas_license_terms():
textPad.delete(1.0,END)
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.
1.License right to use PYAS anti-virus software.
You can use the software on your device or use a copy of the software to design and develop the software.
The software is forbidden to be sold or copied by others without permission. You can only use it to design and develop the software.
2.Obtain genuine PYAS anti-virus software.
You can get the software directly from the official website of PYAS antivirus software, or you can get it through the official GitHub.
If you have obtained this software from a third-party application store that has not been authorized by the official website of PYAS antivirus software,
Then we cannot guarantee that the software can be used normally, and we are not responsible for any related losses caused to you.
Official website: https://xiaomi69ai.wixsite.com/pyas
Official Git: https://github.com/87owo/PYAS
3.Personal information and privacy protection.
You can register your email and name on the official website of PYAS anti-virus software, which will be used for feedback contact.
PYAS anti-virus software will obtain the computer system version and basic information, which will be used to optimize the operation of the software.
The security of your equipment and personal data is very important to us, and we will never leak any of your personal information.
4.Permission required to use PYAS anti-virus software.
System administrator permissions
Turn on target site permissions
File read and write management permissions
Command prompt execution permission
Login editor management authority
''')
def microsoft_license_terms():
textPad.delete(1.0,END)
textPad.insert("insert", '''MICROSOFT SOFTWARE LICENSE TERMS
MICROSOFT SAFETY SCANNER 1.0
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
@@ -85,6 +132,81 @@ This limitation applies to
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
''')
lock = threading.Lock()
def pyclamd_scan():
textPad.delete(1.0,END)
try:
cd = pyclamd.ClamdAgnostic()
cd.reload()
if cd.scan_file(filedialog.askopenfilename()) == None:
textPad.insert("insert", '✔此檔案目前沒有惡意')
else:
textPad.insert("insert", '✖此檔案可能含有惡意內容')
except Exception as e:
textPad.insert("insert", '✖啟動失敗,錯誤資訊: '+str(e))
def threading_cmd(tcmd):
stcmd=threading.Thread(target=tcmd)
stcmd.start()
#stcmd.join()
#lock.acquire()
#lock.release()
def zip_dir():
path = filedialog.askdirectory()
zf = zipfile.ZipFile('{}.zip'.format(path), 'w', zipfile.ZIP_DEFLATED)
for root, dirs, files in os.walk(path):
for file_name in files:
zf.write(os.path.join(root, file_name))
def computer_info():
textPad.delete(1.0,END)
textPad.insert("insert", '''
系統版本資訊:
============================================================================
''')
textPad.insert("insert", platform.platform())
textPad.insert("insert", '''
''')
textPad.insert("insert", platform.architecture())
textPad.insert("insert", '''
''')
textPad.insert("insert", platform.node())
textPad.insert("insert", '''
''')
textPad.insert("insert", platform.processor())
textPad.insert("insert", '''
''')
def camera_is_open_check():
textPad.delete(1.0,END)
try:
cap = cv2.VideoCapture(0)
ret, frame = cap.read()
if ret:
textPad.insert("insert", '✔當前攝像頭屬於關閉狀態。')
cap.release()
else:
textPad.insert("insert", '✖當前攝像頭已被其他應用程式占用,可能會有隱私風險。')
cap.release()
except:
textPad.insert("insert", '✖當前攝像頭檢測異常,可能會有隱私風險。')
def camera_is_open_check_en():
textPad.delete(1.0,END)
try:
cap = cv2.VideoCapture(0)
ret, frame = cap.read()
if ret:
textPad.insert("insert", '✔The current camera is in the off state.')
cap.release()
else:
textPad.insert("insert", '✖The current camera is already occupied by other applications, and there may be privacy risks.')
cap.release()
except:
textPad.insert("insert", '✖The current camera detects abnormalities, and there may be privacy risks.')
def input_pyas_key():
textPad.delete(1.0,END)
t=Toplevel(root)
@@ -110,20 +232,25 @@ def pyas_key(ipw):
showerror('Error', '''密碼錯誤''')
def ask_pro():
textPad.delete(1.0,END)
if askokcancel('Pro','''此功能僅適用於專業版用戶,您要解鎖此功能嗎?''', default="ok"):
input_pyas_key()
else:
pass
def exe_ca():
textPad.delete(1.0,END)
pe = pefile.PE(filedialog.askopenfilename())
for section in pe.sections:
root.update()
textPad.insert("insert", section.Name, hex(section.VirtualAddress),
hex(section.Misc_VirtualSize), section.SizeOfRawData)
def exe_cb():
textPad.delete(1.0,END)
pe = pefile.PE(filedialog.askopenfilename())
for entry in pe.DIRECTORY_ENTRY_IMPORT:
root.update()
ft = open('PYASF.txt','a')
ft.write(str(entry.dll)+'''
''')
@@ -140,12 +267,14 @@ def exe_cb():
ft.close()
textPad.insert("insert",str(fe))
os.remove('PYASF.txt')
def smart_scan():
textPad.delete(1.0,END)
f = open('FSCAN.bat','w',encoding="utf-8")
f.write('''MSERT.exe /n''')
f.close()
os.system('start FSCAN.bat')
#os.remove('FSCAN.bat')
def ai_scan():
textPad.delete(1.0,END)
@@ -163,7 +292,7 @@ def ai_scan():
textPad.insert("insert", '✖輸入檔案錯誤,未選擇檔案')
else:
if trying == -1:
print('✖輸入檔案錯誤,沒有副檔名')
textPad.insert("insert", '✖輸入檔案錯誤,沒有副檔名')
elif trying == 0:
textPad.insert("insert", '✖輸入檔案錯誤,沒有正檔名')
else:
@@ -175,11 +304,13 @@ def ai_scan():
for entry in pefile.PE(myfile).DIRECTORY_ENTRY_IMPORT:
#print(entry.dll)
for function in entry.imports:
root.update()
#print('\t', function.name)
#fe = function.name
fe.append(function.name)
cc = str(fe)
for a in range(at):
root.update()
if at_list_winf[a] in str(cc) and a != t - 1:
blist.append(at_list_winf[a])
continue
@@ -207,7 +338,12 @@ def ai_scan():
if len(blist) == 0:
textPad.insert("insert", '✔此檔案目前沒有高危險行為')
else:
textPad.insert("insert", '✖已檢測到可疑行為,可疑內容: '+ str(blist))
textPad.insert("insert", '''
✖已檢測到可疑行為,可疑內容:
============================================================================
'''+ str(''',
'''.join(blist))+'.')
else:
textPad.insert("insert", '✖輸入檔案錯誤,不能有引號')
else:
@@ -215,6 +351,17 @@ def ai_scan():
def input_antivirus_immediately():
textPad.delete(1.0,END)
try:
pids = psutil.pids()
textPad.insert("insert", '''
已尋找到的檔案名稱:
============================================================================
''')
for pid in pids:
textPad.insert("insert",psutil.Process(pid).name()+'''
''')
except:
pass
t=Toplevel(root)
t.title('檔案名稱')
t.geometry('260x40')
@@ -272,8 +419,8 @@ def reset_network():
def input_find_files():
textPad.delete(1.0,END)
if askokcancel('Warning','''執行過程需要一段時間,程式可能
會暫時性停止運作,是否繼續?''', default="cancel", icon="warning"):
'''
if askokcancel('Warning','執行過程需要一段時間,程式可能會暫時性停止運作,是否繼續?', default="cancel", icon="warning"):
t=Toplevel(root)
t.title('檔案名稱')
t.geometry('260x40')
@@ -288,6 +435,19 @@ def input_find_files():
Button(t,text='確定',command=lambda :find_files_info(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
else:
pass
'''
t=Toplevel(root)
t.title('檔案名稱')
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 :find_files_info(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
def find_files_info(ffile):
textPad.delete(1.0,END)
@@ -335,8 +495,11 @@ def find_files_info(ffile):
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)
@@ -366,6 +529,7 @@ def repair_system_files():
textPad.delete(1.0,END)
if askokcancel('Warning','''執行過程需要一段時間,程式可能
會暫時性停止運作,是否繼續?''', default="cancel", icon="warning"):
root.update()
runc = os.system('''sfc /scannow''')
if runc == 0:
textPad.insert("insert", '✔成功: 執行成功。')
@@ -376,6 +540,7 @@ def repair_system_files():
pass
def start_safe_mode():
textPad.delete(1.0,END)
if askokcancel('Warning','''啟動安全模式需要重新啟動,是否繼續?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
os.system('net user administrator /active:yes')
@@ -385,7 +550,30 @@ def start_safe_mode():
else:
pass
def start_safe_mode_net():
textPad.delete(1.0,END)
if askokcancel('Warning','''啟動安全模式需要重新啟動,是否繼續?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
os.system('net user administrator /active:yes')
os.system('bcdedit /set {default} safeboot network')
time.sleep(1)
os.system('shutdown -r -t 0')
else:
pass
def start_safe_mode_cmd():
textPad.delete(1.0,END)
if askokcancel('Warning','''啟動安全模式需要重新啟動,是否繼續?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
os.system('net user administrator /active:yes')
os.system('bcdedit /set {default} safeboot minimal bcdedit /set {default} safebootalternateshell yes')
time.sleep(1)
os.system('shutdown -r -t 0')
else:
pass
def close_safe_Mode():
textPad.delete(1.0,END)
if askokcancel('Warning','''關閉安全模式需要重新啟動,是否繼續?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
os.system('net user administrator /active:no')
@@ -396,6 +584,7 @@ def close_safe_Mode():
pass
def input_custom_cmd_command():
textPad.delete(1.0,END)
if askokcancel('Warning','''自訂指令有可能讓心懷不軌的使用者取得
這個電腦的控制及存取權,是否繼續?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
@@ -415,18 +604,20 @@ def input_custom_cmd_command():
pass
def input_system_autorun():
textPad.delete(1.0,END)
if askokcancel('Warning','''自訂指令有可能讓心懷不軌的使用者取得
這個電腦的控制及存取權,是否繼續?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
t=Toplevel(root)
t.title('自訂指令')
t.geometry('260x130')
t.geometry('260x40')
t.transient(root)
Label(t,text=' 指令01: ').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=' 指令02: ').grid(row=1,column=0,sticky='e')
v2=StringVar()
e2=Entry(t,width=20,textvariable=v2)
@@ -447,19 +638,19 @@ def input_system_autorun():
e5=Entry(t,width=20,textvariable=v5)
e5.grid(row=4,column=1,padx=2,pady=2,sticky='we')
e5.focus_set()
'''
c=IntVar()
fss = 0
Button(t,text='確定',command=lambda :system_autorun(e.get(),e2.get(),e3.get(),e4.get(),e5.get())).grid(row=4,column=2,sticky='e'+'w',pady=0)
Button(t,text='確定',command=lambda :system_autorun(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
else:
pass
def system_autorun(cmd1,cmd2,cmd3,cmd4,cmd5):
def system_autorun(cmd1):
textPad.delete(1.0,END)
subprocess.run(cmd1, shell=True)
subprocess.run(cmd2, shell=True)
subprocess.run(cmd3, shell=True)
subprocess.run(cmd4, shell=True)
subprocess.run(cmd5, shell=True)
f = open('%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\ARUN.cmd','w')
f.write(cmd1)
f.close()
textPad.insert("insert", '執行完畢。')
def input_custom_regedit_command():
@@ -497,6 +688,7 @@ def input_custom_regedit_command():
pass
def custom_regedit_command(path,cmd,reg,num):
textPad.delete(1.0,END)
f = open('PYASR.reg','w',encoding="utf-8")
f.write('''Windows Registry Editor Version 5.00
['''+str(path)+''']
@@ -540,6 +732,7 @@ def input_encrypt():
Button(t,text='確定',command=lambda :encrypt(e.get(),e2.get())).grid(row=1,column=2,sticky='e'+'w',pady=2)
def encrypt(e,e2):
textPad.delete(1.0,END)
'''
textPad.delete(1.0,END)
ts = 1
@@ -578,6 +771,7 @@ def input_decrypt():
Button(t,text='確定',command=lambda :decrypt(e.get(),e2.get())).grid(row=1,column=2,sticky='e'+'w',pady=2)
def decrypt(e,e2):
textPad.delete(1.0,END)
'''
textPad.delete(1.0,END)
ts = 1
@@ -594,10 +788,11 @@ def decrypt(e,e2):
textPad.insert("insert", '您的解密內容: '+str(cryptocode.decrypt(e, e2)))
def input_send_text():
textPad.delete(1.0,END)
if askokcancel('Warning','''發送訊息需要對方開啟接收模式,是否繼續?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
t=Toplevel(root)
t.title('輸入文字')
t.title('發送訊息')
t.geometry('260x90')
t.transient(root)
Label(t,text=' 輸入: ').grid(row=0,column=0,sticky='e')
@@ -622,21 +817,23 @@ def input_send_text():
pass
def send_text(message,HOST,PORT):
textPad.delete(1.0,END)
try:
#HOST = '127.0.0.1' # IP地址
#PORT = 50007 # 埠
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
s.connect((HOST, int(PORT)))
s.sendall(message.encode())
except:
showerror('Error', '''請先將準備接收的設備開啟接收模式''')
def input_receive_text():
textPad.delete(1.0,END)
if askokcancel('Warning','''等待接收過程需要一段時間,程式可能
會暫時性停止運作,是否繼續?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
t=Toplevel(root)
t.title('輸入文字')
t.title('接收訊息')
t.geometry('260x70')
t.transient(root)
Label(t,text=' 地址: ').grid(row=1,column=0,sticky='e')
@@ -656,13 +853,16 @@ def input_receive_text():
pass
def receive_text(HOST,PORT):
textPad.delete(1.0,END)
max_connect = 5 # 最大連線數
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
root.update()
s.bind((HOST, int(PORT)))
s.listen()
conn, _ = s.accept()
data = conn.recv(1024).decode()
textPad.insert("insert",'接收到的內容: '+data)
root.update()
def software_update():
webbrowser.open('https://xiaomi69ai.wixsite.com/pyas')
@@ -672,10 +872,10 @@ def website():
def about():
showinfo('Copyright','''官方網站: https://xiaomi69ai.wixsite.com/pyas
版權所有© 2020-2021 PYAS Python Antivirus Software''')
版權所有© 2020-2022 PYAS Python Antivirus Software''')
def version():
showinfo('Version','軟體版本: PYAS V1.6')
showinfo('Version','軟體版本: PYAS V1.8.1')
def is_admin():
try:
@@ -738,6 +938,11 @@ def traditional_chinese():
sitmenu = Menu(filemenu5,tearoff=False)
filemenu5.add_cascade(label='軟體設置', menu=sitmenu, underline=0)
sitmenu.add_command(label="更新軟體", command=software_update)
sitmenu.add_separator()
sitmenu.add_command(label="更換成 Microsoft 引擎 (預設)", command=set_microsoft_engine)
sitmenu.add_command(label="更換成 PyclamdAV 引擎 (測試)", command=set_pyclamdav_engine)
sitmenu.add_separator()
sitmenu.add_command(label="更換成 PYAE 引擎 (尚未開放)", command=set_pyae_engine)
#sitwmenu = Menu(sitmenu,tearoff=False)
#filemenu5.add_cascade(label='字體大小', menu=sitwmenu, underline=0)
#sitwmenu.add_command(label="增大字體", command=sizeb)
@@ -761,6 +966,7 @@ def traditional_chinese():
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 8)
def traditional_chinese_pro():
textPad.delete(1.0,END)
if is_admin():
try:
ft = open('PYASL.ini','w')
@@ -789,7 +995,16 @@ def traditional_chinese_pro():
sub2menu.add_command(label = '修復系統權限',command = fix_cmd_permissions)
sub2menu.add_separator()
sub2menu.add_command(label = '啟動安全模式',command = start_safe_mode)
#sub2menu.add_command(label = '啟動網路安全模式',command = start_safe_mode_net)
#sub2menu.add_command(label = '啟動命令安全模式',command = start_safe_mode_cmd)
sub2menu.add_command(label = '關閉安全模式',command = close_safe_Mode)
sub2menu.add_separator()
sub2menu.add_command(label = '系統版本資訊',command = computer_info)
insmenu = Menu(filemenu3,tearoff=False)
filemenu3.add_cascade(label='隱私工具', menu=insmenu, underline=0)
insmenu.add_command(label = '攝像頭隱私檢測',command = camera_is_open_check)
#insmenu.add_separator()
#insmenu.add_command(label = '持續增加中...')#,command = input_custom_cmd_command)
submenu = Menu(filemenu3,tearoff=False)
filemenu3.add_cascade(label='更多工具', menu=submenu, underline=0)
submenu.add_command(label = '尋找檔案',command = input_find_files)
@@ -832,8 +1047,10 @@ def traditional_chinese_pro():
aboutmenu.add_command(label = '關於我們',command = about)
aboutmenu.add_command(label = '軟體版本',command = version)
aboutmenu.add_separator()
aboutmenu.add_command(label = '許可條款',command = microsoft_license_terms)
#aboutmenu.add_command(label = 'PYAS許可條款',command = version)
licmenu = Menu(aboutmenu,tearoff=False)
aboutmenu.add_cascade(label='許可條款', menu=licmenu, underline=0)
licmenu.add_command(label = 'PYAS 許可條款',command = pyas_license_terms)
licmenu.add_command(label = 'Microsoft 許可條款',command = microsoft_license_terms)
menubar.add_cascade(label = '關於',menu = aboutmenu)
root.mainloop()
except Exception as e:
@@ -874,12 +1091,32 @@ Do you want to unlock this feature?''', default="ok", icon="info"):
else:
pass
def computer_info_en():
textPad.delete(1.0,END)
textPad.insert("insert", '''
System version information:
============================================================================
''')
textPad.insert("insert", platform.platform())
textPad.insert("insert", '''
''')
textPad.insert("insert", platform.architecture())
textPad.insert("insert", '''
''')
textPad.insert("insert", platform.node())
textPad.insert("insert", '''
''')
textPad.insert("insert", platform.processor())
textPad.insert("insert", '''
''')
def smart_scan_en():
textPad.delete(1.0,END)
f = open('FSCAN.bat','w',encoding="utf-8")
f.write('''MSERT.exe /n''')
f.close()
os.system('start FSCAN.bat')
#os.remove('FSCAN.bat')
def ai_scan_en():
textPad.delete(1.0,END)
@@ -889,7 +1126,7 @@ def ai_scan_en():
myfile = filedialog.askopenfilename()
trying = myfile.find('.')
trying2 = myfile.find('/.')
trypat = myfile.find('/')
trypath = myfile.find('/')
trydot = myfile.find('"')
tryos = myfile.find('PYAS.py')
if tryos == -1:
@@ -897,7 +1134,7 @@ def ai_scan_en():
textPad.insert("insert", '✖Input file error, file not selected')
else:
if trying == -1:
print('✖Input file error, no correct file name')
textPad.insert("insert", '✖Input file error, no correct file name')
elif trying == 0:
textPad.insert("insert", '✖Input file error, no correct file name')
else:
@@ -909,11 +1146,13 @@ def ai_scan_en():
for entry in pefile.PE(myfile).DIRECTORY_ENTRY_IMPORT:
#print(entry.dll)
for function in entry.imports:
root.update()
#print('\t', function.name)
#fe = function.name
fe.append(function.name)
cc = str(fe)
for a in range(at):
root.update()
if at_list_winf[a] in str(cc) and a != t - 1:
blist.append(at_list_winf[a])
continue
@@ -941,15 +1180,30 @@ def ai_scan_en():
if len(blist) == 0:
textPad.insert("insert", '✔There are currently no high-risk behaviors in this file')
else:
textPad.insert("insert", '✖Suspicious behavior has been detected, Suspicious content: '+ str(blist))
textPad.insert("insert", '''
✖Suspicious behavior has been detected, Suspicious content:
============================================================================
'''+ str(''',
'''.join(blist))+'.')
else:
textPad.insert("insert", '✖Input file error, cannot have quotation marks')
else:
textPad.insert("insert", 'Unable to open system file')
def input_antivirus_immediately_en():
global root,textPad
textPad.delete(1.0,END)
try:
pids = psutil.pids()
textPad.insert("insert", '''
File name found:
============================================================================
''')
for pid in pids:
textPad.insert("insert",psutil.Process(pid).name()+'''
''')
except:
pass
t=Toplevel(root)
t.title('File Name')
t.geometry('260x40')
@@ -1008,8 +1262,9 @@ def reset_network_en():
def input_find_files_en():
textPad.delete(1.0,END)
if askokcancel('Warning','''The execution process takes a while, and the program
may temporarily stop working. Do you want to continue?''', default="cancel", icon="warning"):
'''
if askokcancel('Warning','The execution process takes a while, and the program
may temporarily stop working. Do you want to continue?', default="cancel", icon="warning"):
t=Toplevel(root)
t.title('File Name')
t.geometry('260x40')
@@ -1024,6 +1279,19 @@ may temporarily stop working. Do you want to continue?''', default="cancel", ico
Button(t,text='OK',command=lambda :find_files_info_en(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
else:
pass
'''
t=Toplevel(root)
t.title('File Name')
t.geometry('260x40')
t.transient(root)
Label(t,text=' File Name: ').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 :find_files_info_en(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
def find_files_info_en(ffile):
textPad.delete(1.0,END)
@@ -1071,8 +1339,11 @@ Time consuming: '''+str(end - start)+''' sec''')
pass
def findfile_en(path,ffile,fss,start):
textPad.delete(1.0,END)
try:
textPad.insert("insert", 'Searching: '+str(path))
for fd in os.listdir(path):
root.update()
fullpath = os.path.join(path,fd)
if os.path.isdir(fullpath):
#print('正在掃描: ',fullpath)
@@ -1144,6 +1415,7 @@ def repair_system_files_en():
textPad.delete(1.0,END)
if askokcancel('Warning','''The execution process takes a while, and the program
may temporarily stop working. Do you want to continue?''', default="cancel", icon="warning"):
root.update()
runc = os.system('''sfc /scannow''')
if runc == 0:
textPad.insert("insert", '✔Success: The execution was successful.')
@@ -1163,6 +1435,28 @@ def start_safe_mode_en():
else:
pass
def start_safe_mode_net_en():
textPad.delete(1.0,END)
if askokcancel('Warning','''A restart is required to start safe mode. Do you want to continue?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
os.system('net user administrator /active:yes')
os.system('bcdedit /set {default} safeboot network')
time.sleep(1)
os.system('shutdown -r -t 0')
else:
pass
def start_safe_mode_cmd_en():
textPad.delete(1.0,END)
if askokcancel('Warning','''A restart is required to start safe mode. Do you want to continue?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
os.system('net user administrator /active:yes')
os.system('bcdedit /set {default} safeboot minimal bcdedit /set {default} safebootalternateshell yes')
time.sleep(1)
os.system('shutdown -r -t 0')
else:
pass
def close_safe_Mode_en():
if askokcancel('Warning','''Turning off safe mode requires a restart. Do you want to continue?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
@@ -1280,13 +1574,14 @@ this computer. Do you want to continue?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
t=Toplevel(root)
t.title('Custom CMD')
t.geometry('260x130')
t.geometry('260x40')
t.transient(root)
Label(t,text=' CMD 01: ').grid(row=0,column=0,sticky='e')
Label(t,text=' Command: ').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=' CMD 02: ').grid(row=1,column=0,sticky='e')
v2=StringVar()
e2=Entry(t,width=20,textvariable=v2)
@@ -1307,28 +1602,29 @@ this computer. Do you want to continue?''', default="cancel", icon="warning"):
e5=Entry(t,width=20,textvariable=v5)
e5.grid(row=4,column=1,padx=2,pady=2,sticky='we')
e5.focus_set()
'''
c=IntVar()
fss = 0
Button(t,text='OK',command=lambda :system_autorun_en(e.get(),e2.get(),e3.get(),e4.get(),e5.get())).grid(row=4,column=2,sticky='e'+'w',pady=0)
Button(t,text='確定',command=lambda :system_autorun_en(e.get())).grid(row=0,column=2,sticky='e'+'w',pady=2)
else:
pass
def system_autorun_en(cmd1,cmd2,cmd3,cmd4,cmd5):
def system_autorun_en(cmd1):
textPad.delete(1.0,END)
subprocess.run(cmd1, shell=True)
subprocess.run(cmd2, shell=True)
subprocess.run(cmd3, shell=True)
subprocess.run(cmd4, shell=True)
subprocess.run(cmd5, shell=True)
f = open('%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\ARUN.cmd','w')
f.write(cmd1)
f.close()
textPad.insert("insert", 'Finished.')
def input_send_text_en():
textPad.delete(1.0,END)
if askokcancel('Warning','''Sending a message requires the other party to turn
on the receiving mode. Do you want to continue?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
t=Toplevel(root)
t.title('Input text')
t.geometry('260x110')
t.title('Send Message')
t.geometry('260x90')
t.transient(root)
Label(t,text=' Input: ').grid(row=0,column=0,sticky='e')
v=StringVar()
@@ -1356,17 +1652,18 @@ def send_text_en(message,HOST,PORT):
#HOST = '127.0.0.1' # IP地址
#PORT = 50007 # 埠
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
s.connect((HOST, int(PORT)))
s.sendall(message.encode())
except:
showerror('Error', '''Please turn on the receiving mode of the receiving device first''')
def input_receive_text_en():
textPad.delete(1.0,END)
if askokcancel('Warning','''It takes a while to wait for the receiving process.
The program may temporarily stop working. Do you want to continue?''', default="cancel", icon="warning"):
textPad.delete(1.0,END)
t=Toplevel(root)
t.title('Input text')
t.title('Receive Message')
t.geometry('260x70')
t.transient(root)
Label(t,text=' IP: ').grid(row=1,column=0,sticky='e')
@@ -1386,8 +1683,10 @@ The program may temporarily stop working. Do you want to continue?''', default="
pass
def receive_text_en(HOST,PORT):
textPad.delete(1.0,END)
max_connect = 5 # 最大連線數
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
root.update()
s.bind((HOST, int(PORT)))
s.listen()
conn, _ = s.accept()
@@ -1402,10 +1701,10 @@ def website_en():
def about_en():
showinfo('Copyright','''Official website: https://xiaomi69ai.wixsite.com/pyas
Copyright© 2020-2021 PYAS Python Antivirus Software''')
Copyright© 2020-2022 PYAS Python Antivirus Software''')
def version_en():
showinfo('Version','Software Version: PYAS V1.6')
showinfo('Version','Software Version: PYAS V1.8.1')
def is_admin():
try:
@@ -1479,8 +1778,8 @@ def english():
sit2menu.add_command(label="English", command=english)
aboutmenu = Menu(menubar,tearoff=False)
#aboutmenu.add_command(label = '官方網站',command = website)
aboutmenu.add_command(label = 'About us',command = about)
aboutmenu.add_command(label = 'Software version',command = version)
aboutmenu.add_command(label = 'About us',command = about_en)
aboutmenu.add_command(label = 'Software version',command = version_en)
menubar.add_cascade(label = 'About',menu = aboutmenu)
root.mainloop()
except Exception as e:
@@ -1491,6 +1790,7 @@ Error info: '''+str(e))
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 8)
def english_pro():
textPad.delete(1.0,END)
if is_admin():
try:
ft = open('PYASL.ini','w')
@@ -1518,8 +1818,15 @@ def english_pro():
sub2menu.add_command(label = 'Repair system files',command = repair_system_files_en)
sub2menu.add_command(label = 'Repair system permissions',command = fix_cmd_permissions)
sub2menu.add_separator()
sub2menu.add_command(label = 'Start safe mode',command = start_safe_mode_en)
sub2menu.add_command(label = 'Close safe mode',command = close_safe_Mode_en)
sub2menu.add_command(label = 'Start safeboot mode',command = start_safe_mode_en)
#sub2menu.add_command(label = 'Start network safe mode',command = start_safe_mode_net_en)
#sub2menu.add_command(label = 'Start command safe mode',command = start_safe_mode_cmd_en)
sub2menu.add_command(label = 'Close safeboot mode',command = close_safe_Mode_en)
sub2menu.add_separator()
sub2menu.add_command(label = 'System version info',command = computer_info_en)
insmenu = Menu(filemenu3,tearoff=False)
filemenu3.add_cascade(label='Privacy Tools', menu=insmenu, underline=0)
insmenu.add_command(label = 'Camera privacy detection',command = camera_is_open_check_en)
submenu = Menu(filemenu3,tearoff=False)
filemenu3.add_cascade(label='More Tools', menu=submenu, underline=0)
submenu.add_command(label = 'Find files',command = input_find_files_en)
@@ -1559,11 +1866,13 @@ def english_pro():
sit2menu.add_command(label="English", command=english_pro)
aboutmenu = Menu(menubar,tearoff=False)
#aboutmenu.add_command(label = '官方網站',command = website)
aboutmenu.add_command(label = 'About us',command = about)
aboutmenu.add_command(label = 'Software version',command = version)
aboutmenu.add_command(label = 'About us',command = about_en)
aboutmenu.add_command(label = 'Software version',command = version_en)
aboutmenu.add_separator()
aboutmenu.add_command(label = 'license terms',command = microsoft_license_terms)
#aboutmenu.add_command(label = 'PYAS許可條款',command = version)
licmenu = Menu(aboutmenu,tearoff=False)
aboutmenu.add_cascade(label='license terms', menu=licmenu, underline=0)
licmenu.add_command(label = 'PYAS license terms',command = pyas_license_terms)
licmenu.add_command(label = 'Microsoft license terms',command = microsoft_license_terms)
menubar.add_cascade(label = 'About',menu = aboutmenu)
root.mainloop()
except Exception as e:
@@ -1586,5 +1895,15 @@ def setup_pyas():
english_pro()
except:
english_pro()
def setup_pyeg():
try:
ft = open('PYASE.ini','r')
fe = ft.read()
ft.close()
except:
ft = open('PYASE.ini','w')
ft.write('''microsoft_engine''')
ft.close()
setup_pyas()