Compare commits

..
7 Commits
Author SHA1 Message Date
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 250 additions and 27 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
+171 -27
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,32 @@ import hashlib
import getpass
import json
import stat
import threading
import cryptocode
import tkinter as tk
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.7.0",
company_name="PYAS",
file_description="Python Antivirus Software",
internal_name="PYAS",
legal_copyright="Copyright© 2020-2021 PYAS Python Antivirus Software.",
original_filename="PYAS.exe",
product_name="PYAS"
)
'''
root = Tk()
root.title('PYAS V1.6')
root.title('PYAS V1.7.0')
#root.resizable(0,0)
root.geometry('800x450')
textPad=Text(root,undo=True)
@@ -38,7 +53,34 @@ scroll.pack(side=RIGHT,fill=Y)
group = Label(root, text="Copyright© 2020-2021 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 +127,43 @@ 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 threading_cmd(tcmd):
stcmd=threading.Thread(target=tcmd)
stcmd.start()
#stcmd.join()
#lock.acquire()
#lock.release()
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,18 +189,21 @@ 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:
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:
ft = open('PYASF.txt','a')
@@ -140,12 +222,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 +247,7 @@ def ai_scan():
textPad.insert("insert", '✖輸入檔案錯誤,未選擇檔案')
else:
if trying == -1:
print('✖輸入檔案錯誤,沒有副檔名')
textPad.insert("insert", '✖輸入檔案錯誤,沒有副檔名')
elif trying == 0:
textPad.insert("insert", '✖輸入檔案錯誤,沒有正檔名')
else:
@@ -207,7 +291,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 +304,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')
@@ -232,7 +332,7 @@ def antivirus_immediately(app):
textPad.delete(1.0,END)
done = False
while not done:
run = subprocess.call('tasklist |find /i "'+str(app)+'"',shell=True)
run = subprocess.call('tasklist |find /i "'+str(app)+'"')
if run == 0:
#textPad.insert("insert", 'The program has been found "'+str(app)+'"')
of = subprocess.call('taskkill /f /im '+str(app),shell=True)
@@ -376,6 +476,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')
@@ -386,6 +487,7 @@ def start_safe_mode():
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 +498,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,6 +518,7 @@ 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)
@@ -497,6 +601,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 +645,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 +684,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 +701,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 +730,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,6 +766,7 @@ 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:
s.bind((HOST, int(PORT)))
@@ -675,7 +786,7 @@ def about():
版權所有© 2020-2021 PYAS Python Antivirus Software''')
def version():
showinfo('Version','軟體版本: PYAS V1.6')
showinfo('Version','軟體版本: PYAS V1.7.0')
def is_admin():
try:
@@ -761,6 +872,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')
@@ -790,6 +902,11 @@ def traditional_chinese_pro():
sub2menu.add_separator()
sub2menu.add_command(label = '啟動安全模式',command = start_safe_mode)
sub2menu.add_command(label = '關閉安全模式',command = close_safe_Mode)
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 +949,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:
@@ -880,6 +999,7 @@ def smart_scan_en():
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 +1009,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 +1017,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:
@@ -941,15 +1061,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')
@@ -1323,12 +1458,13 @@ def system_autorun_en(cmd1,cmd2,cmd3,cmd4,cmd5):
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 +1492,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,6 +1523,7 @@ 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:
s.bind((HOST, int(PORT)))
@@ -1405,7 +1543,7 @@ def about_en():
Copyright© 2020-2021 PYAS Python Antivirus Software''')
def version_en():
showinfo('Version','Software Version: PYAS V1.6')
showinfo('Version','Software Version: PYAS V1.7.0')
def is_admin():
try:
@@ -1479,8 +1617,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 +1629,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')
@@ -1520,6 +1659,9 @@ def english_pro():
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)
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 +1701,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 +1730,5 @@ def setup_pyas():
english_pro()
except:
english_pro()
setup_pyas()