Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
316882bcd0 | ||
|
|
b204e52297 | ||
|
|
f82a63f4c8 | ||
|
|
cb0f2108a4 | ||
|
|
300b7a7a68 | ||
|
|
c3852ca60d | ||
|
|
a5fb735c93 | ||
|
|
d0b04ba84f | ||
|
|
9552742a39 | ||
|
|
8e9bdf6c0c | ||
|
|
818cc48502 | ||
|
|
adc4e28eb8 | ||
|
|
2e3a4d3bf1 | ||
|
|
d9bcac78e7 | ||
|
|
2342947849 | ||
|
|
19204dee8d | ||
|
|
863fa90b80 | ||
|
|
6fdef4a8f1 | ||
|
|
9469ceaa02 | ||
|
|
857f184409 | ||
|
|
a2f4a725f5 | ||
|
|
d12449bbb9 | ||
|
|
a41f4711dd | ||
|
|
3c2b018d49 | ||
|
|
e221a09709 | ||
|
|
26ff4bd843 | ||
|
|
d8e28f384a | ||
|
|
65e68c3cc4 | ||
|
|
7b76ab2a59 | ||
|
|
ae2a01b463 | ||
|
|
cda022a9f4 | ||
|
|
672e48c5f8 | ||
|
|
6fbdb1354f | ||
|
|
79bc7fd443 | ||
|
|
5578dd3339 | ||
|
|
0232dbd196 | ||
|
|
d44e192eaa | ||
|
|
4f12b19cf8 | ||
|
|
392ac1b1c7 | ||
|
|
8ad175aca3 | ||
|
|
6afa58c42b | ||
|
|
8be03cf232 | ||
|
|
23ea53d3ff | ||
|
|
294f40e7ac | ||
|
|
4f5f706ee5 | ||
|
|
27c1a7b4e4 | ||
|
|
cfaa5be6d7 | ||
|
|
a6942280a0 | ||
|
|
159124e6a3 | ||
|
|
6e63293a3c | ||
|
|
9a9dc0d788 | ||
|
|
e201cd074c | ||
|
|
0fd49a6e1c | ||
|
|
6169a85464 | ||
|
|
e583344fee | ||
|
|
dcee00394c | ||
|
|
e48dc99dc0 | ||
|
|
3ba3dda384 | ||
|
|
bbf1ce993c | ||
|
|
56245a8c9b | ||
|
|
4f2e65094c | ||
|
|
0bf456cbc8 | ||
|
|
9213d0da16 | ||
|
|
13f2ece0ff | ||
|
|
45c2a74c94 | ||
|
|
b1b3e90e9b | ||
|
|
90ef841dae | ||
|
|
b46000e8eb | ||
|
|
b24891355d | ||
|
|
14bde5a790 | ||
|
|
d6445f17e3 | ||
|
|
6124c3fe40 | ||
|
|
5531a4b194 | ||
|
|
839a0bbd42 | ||
|
|
1ba6272e4e | ||
|
|
fdd86815ef | ||
|
|
c8091fdc84 | ||
|
|
9d569bd9e3 | ||
|
|
1991664cd1 | ||
|
|
ee7064fafc | ||
|
|
cdaf861485 | ||
|
|
3e962b1da9 | ||
|
|
8398f1706c | ||
|
|
24d2d441b4 | ||
|
|
5700039d42 | ||
|
|
22445c79d4 | ||
|
|
2be05ac76c | ||
|
|
84e397aeed | ||
|
|
bb513b9115 | ||
|
|
01b680e278 | ||
|
|
ef7c1cba2e | ||
|
|
40bbc57c82 | ||
|
|
457e5bebbb | ||
|
|
99abc56177 | ||
|
|
9eeb0b6376 | ||
|
|
0b2da187ee | ||
|
|
06f5410a4d | ||
|
|
2551ada3b7 | ||
|
|
56df08879e | ||
|
|
d41685c86e | ||
|
|
14b942970e | ||
|
|
b6103c845d | ||
|
|
7927f12e84 | ||
|
|
7774ff77b2 | ||
|
|
aaa2ed7eef | ||
|
|
b83674e9b7 | ||
|
|
017356780c | ||
|
|
45916004d2 | ||
|
|
388c8b615e | ||
|
|
4219473632 | ||
|
|
f2283cdb7f | ||
|
|
72ce9cfd6b | ||
|
|
b26375d25a | ||
|
|
a2a823f358 | ||
|
|
62164cf628 | ||
|
|
0b5fc22181 | ||
|
|
0df905f777 | ||
|
|
a539a948f6 | ||
|
|
6bd8364b5f | ||
|
|
70b70bc3e7 | ||
|
|
ac50f8917e | ||
|
|
f935b2c0b6 | ||
|
|
245c9d1119 | ||
|
|
9476313725 | ||
|
|
2d27a74278 | ||
|
|
823a5115eb | ||
|
|
33ab1e1f5e | ||
|
|
8db984d1fd | ||
|
|
a00415657a | ||
|
|
527837cc56 | ||
|
|
ac9ddff8b1 | ||
|
|
4ebae2a167 | ||
|
|
11f1685f42 | ||
|
|
8199101891 | ||
|
|
4f3ce323ae | ||
|
|
76befc7c70 | ||
|
|
8b0ad06676 | ||
|
|
d7f091a3a9 | ||
|
|
679b00229c | ||
|
|
0cfc636fb6 | ||
|
|
bd3c31e150 | ||
|
|
8e9547b75a | ||
|
|
d38ecc0f96 | ||
|
|
85834497e0 | ||
|
|
0d8997db02 | ||
|
|
cb53450ca5 | ||
|
|
f38ae36eb6 | ||
|
|
8218b0c8a6 | ||
|
|
ea036d2d53 | ||
|
|
b163eb2cdb | ||
|
|
ba3568f312 | ||
|
|
80c9976832 | ||
|
|
b6326c25b9 | ||
|
|
35f591cf49 | ||
|
|
67e437bbd7 | ||
|
|
194dae8ce1 | ||
|
|
a89442ceb0 | ||
|
|
24debf6062 | ||
|
|
ff98846c99 | ||
|
|
e3f5a0bca1 | ||
|
|
7278e4f051 | ||
|
|
709a511c1d | ||
|
|
452027f085 | ||
|
|
8574802428 | ||
|
|
79fb044921 | ||
|
|
13ac634fea | ||
|
|
04a68bc262 | ||
|
|
47de15ab68 | ||
|
|
512af24a05 | ||
|
|
e5ff46d3bb | ||
|
|
c7a0979140 | ||
|
|
7fd7245df2 | ||
|
|
026301b011 | ||
|
|
5cc77f90ae | ||
|
|
0d4568ac8a | ||
|
|
a6ed491a39 | ||
|
|
90dfc3f1ae | ||
|
|
36388fb0d7 | ||
|
|
043166d0c8 | ||
|
|
b92d488851 | ||
|
|
d841a04a89 | ||
|
|
d8553baa78 | ||
|
|
8521d5aee3 | ||
|
|
ebe21d9c7f | ||
|
|
3b83abdbd3 | ||
|
|
aead2463c9 | ||
|
|
5cc5676672 | ||
|
|
ecc32ca18d | ||
|
|
661640de79 | ||
|
|
96dfdab7ed | ||
|
|
56bed5fd3b | ||
|
|
3fd3b18406 | ||
|
|
45bac97a16 | ||
|
|
2c6eca4a92 | ||
|
|
8109d59655 | ||
|
|
8a15571cd2 | ||
|
|
a15c8f2e60 | ||
|
|
cec3d6c04d | ||
|
|
d872604855 | ||
|
|
2b6fb933a4 | ||
|
|
1da892e863 | ||
|
|
19bfedd1a3 | ||
|
|
cb87392d9d | ||
|
|
7cd5bc9ec3 | ||
|
|
edcc1a30ab | ||
|
|
6f93f6ab06 | ||
|
|
9de1f44288 | ||
|
|
3d360b0881 | ||
|
|
cf1c415846 | ||
|
|
90133e2444 | ||
|
|
81246046b8 | ||
|
|
20e037ab9e | ||
|
|
bc27036ba7 | ||
|
|
1cd470b90b | ||
|
|
64471e34bc | ||
|
|
f4c5d3de09 | ||
|
|
0dc59405e3 | ||
|
|
7c775bdc9b | ||
|
|
61400ff4d4 | ||
|
|
e119e34ebe | ||
|
|
6f059747bf | ||
|
|
24d72641fa | ||
|
|
b91fca3aa6 | ||
|
|
a6f1947837 | ||
|
|
6919131cef | ||
|
|
9186d801fc | ||
|
|
76e2f200bd | ||
|
|
1400bbd9ce | ||
|
|
fd37628ac2 | ||
|
|
4396d5afc4 | ||
|
|
f5faf80883 | ||
|
|
ba32da97c8 | ||
|
|
ec2de73d3a | ||
|
|
f4d032e5c7 | ||
|
|
4114aac6c3 | ||
|
|
0c43c6bb5f | ||
|
|
7b3c965b88 | ||
|
|
d1035268f6 | ||
|
|
8968f30bf9 | ||
|
|
84c2c29600 | ||
|
|
b2a59f261c | ||
|
|
363a330f8e | ||
|
|
1d2aa059ee | ||
|
|
f2bfa908a1 | ||
|
|
02a8de4696 | ||
|
|
22fa3eff71 | ||
|
|
69361209c3 | ||
|
|
ff0aeaa4ef | ||
|
|
3c461dfd4b | ||
|
|
c6beda383e | ||
|
|
3d59f3befd | ||
|
|
e54f0db239 | ||
|
|
0f877f2749 | ||
|
|
b69ba165d9 | ||
|
|
965076fe52 | ||
|
|
f4d6cb0430 | ||
|
|
19d412188c |
No files matched your search
@@ -0,0 +1,34 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
:: Check for permissions
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\icacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
|
||||
if %errorlevel% NEQ 0 goto NoAdmin
|
||||
goto gotAdmin
|
||||
|
||||
:NoAdmin
|
||||
echo You do not have administrator rights, please run this script as administrator.
|
||||
pause
|
||||
exit /B
|
||||
|
||||
:gotAdmin
|
||||
if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
|
||||
|
||||
set "script_dir=%~dp0"
|
||||
set "script_dir=%script_dir:~0,-1%"
|
||||
|
||||
bcdedit -debug on
|
||||
bcdedit /set testsigning on
|
||||
bcdedit /deletevalue {current} safeboot
|
||||
|
||||
powershell.exe -ExecutionPolicy Bypass -Command ^
|
||||
"$endDate = (Get-Date).AddYears(100); ^
|
||||
$cert = New-SelfSignedCertificate -DnsName PYAS -CertStoreLocation cert:\LocalMachine\My -Type CodeSigning -NotAfter $endDate; ^
|
||||
$pwd = ConvertTo-SecureString -String 'PYAS' -Force -AsPlainText; ^
|
||||
Export-PfxCertificate -Cert $cert -FilePath '%script_dir%\PYAS.pfx' -Password $pwd;"
|
||||
"%script_dir%\signtool.exe" sign /f "%script_dir%\PYAS.pfx" /p PYAS "%script_dir%\PYAS_Driver.sys"
|
||||
sc create PYAS_Driver type= kernel start= demand binPath= "%script_dir%\PYAS_Driver.sys"
|
||||
|
||||
shutdown -r -t 0
|
||||
endlocal
|
||||
Whitespace-only changes.
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
:: Check for permissions
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\icacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
|
||||
if %errorlevel% NEQ 0 goto NoAdmin
|
||||
goto gotAdmin
|
||||
|
||||
:NoAdmin
|
||||
echo You do not have administrator rights, please run this script as administrator.
|
||||
pause
|
||||
exit /B
|
||||
|
||||
:gotAdmin
|
||||
if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
|
||||
|
||||
sc stop PYAS_Driver
|
||||
sc delete PYAS_Driver
|
||||
|
||||
bcdedit /set testsigning off
|
||||
bcdedit -debug off
|
||||
|
||||
shutdown -r -t 0
|
||||
endlocal
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Labels": ["White/Pefile", "White/Script", "Virus/Pefile", "Virus/Script"],
|
||||
|
||||
"Detect": ["Virus/Pefile", "Virus/Script"],
|
||||
|
||||
"Pixels": [224, 224],
|
||||
|
||||
"Values": 95
|
||||
}
|
||||
Binary file not shown.
@@ -1,31 +0,0 @@
|
||||
import json, hashlib
|
||||
|
||||
class ListCompressor:
|
||||
def __init__(self):
|
||||
self.model = {}
|
||||
|
||||
def save_model(self, file_name):
|
||||
with open(file_name, 'w') as f:
|
||||
json.dump(self.model, f)
|
||||
print(f"\nModel Is Saved In {file_name}")
|
||||
|
||||
def load_model(self, model_data):
|
||||
if isinstance(model_data, str):
|
||||
with open(model_data, 'r') as f:
|
||||
model_data = json.load(f)
|
||||
self.model = model_data
|
||||
|
||||
def train_model(self, label, data):
|
||||
if label not in self.model:
|
||||
self.model[label] = []
|
||||
for lst in data:
|
||||
self.model[label].append(hashlib.md5(''.join(map(str, lst)).encode()).hexdigest()[:8])
|
||||
|
||||
def predict(self, new_list):
|
||||
for label, items in self.model.items():
|
||||
if label != 'word' and hashlib.md5(''.join(map(str, new_list)).encode()).hexdigest()[:8] in items:
|
||||
return True
|
||||
return False
|
||||
|
||||
def get_label(self):
|
||||
return list(self.model.keys())[0]
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
import os, io, sys, time, json, yara
|
||||
import numpy, pefile, onnxruntime
|
||||
from PIL import Image, ImageShow
|
||||
|
||||
class YRScan:
|
||||
def __init__(self):
|
||||
self.rules = {}
|
||||
self.network = []
|
||||
|
||||
def load_rules(self, file_path):
|
||||
try:
|
||||
ftype = str(f".{file_path.split('.')[-1]}").lower()
|
||||
if ftype in [".yara", ".yar"]:
|
||||
self.rules[file_path] = yara.compile(file_path)
|
||||
elif ftype in [".yc", ".yrc"]:
|
||||
self.rules[file_path] = yara.load(file_path)
|
||||
elif ftype in [".ip", ".ips"]:
|
||||
with open(file_path, "r") as f:
|
||||
self.network += [l.strip() for l in f.readlines()]
|
||||
except:
|
||||
pass
|
||||
|
||||
def yr_scan(self, file_path):
|
||||
try:
|
||||
if isinstance(file_path, str):
|
||||
with open(file_path, "rb") as f:
|
||||
file_path = f.read()
|
||||
for name, rules in self.rules.items():
|
||||
matchs_rules = rules.match(data=file_path)
|
||||
if matchs_rules:
|
||||
return "Virus/Rules", matchs_rules
|
||||
return False, False
|
||||
except:
|
||||
return False, False
|
||||
|
||||
class DLScan:
|
||||
def __init__(self):
|
||||
self.models = {}
|
||||
self.shells = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '!o',
|
||||
'cry', 'test', 'ace', 'yg', 'obr', 'tvm', 'dec', 'enc', 'b1_', 'base',
|
||||
'bss', 'clr_uef', 'cursors', 'trs_age', 'engine', 'enigma', 'protect',
|
||||
'nep', 'no_bbt', 'wpp_sf', 'retpol', 'rt', 'rwexec', 'rygs', 'poolmi',
|
||||
's:@', 'pgae', 'proxy', 'wisevec', 'segm', 'transit', 'vmp', 'extjmp',
|
||||
'upx', 'tracesup', 'res', 'lzma', 'malloc_h', 'miniex', 'ndr64', 'be',
|
||||
'mssmixer', 'wow', 'press', 'fio', 'pad', 'hexpthk', 'h~;', 'icapsec',
|
||||
'sanontcp', 'secur', 'asmstub', 'nsys_wr', 'orpc', 'pack', 'wow64svc',
|
||||
'uedbg', 'viahw', 'data', 'zk', 'fothk', 'qihoo']
|
||||
|
||||
def load_model(self, file_path):
|
||||
try:
|
||||
ftype = str(f".{file_path.split('.')[-1]}").lower()
|
||||
if ftype in [".json", ".txt"]:
|
||||
with open(file_path, 'r') as f:
|
||||
self.class_names = json.load(f)
|
||||
elif ftype in [".onnx"]:
|
||||
self.models[file_path] = onnxruntime.InferenceSession(file_path)
|
||||
self.labels = self.class_names['Labels']
|
||||
self.detect = self.class_names['Detect']
|
||||
self.pixels = self.class_names['Pixels']
|
||||
self.values = self.class_names['Values']
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
def dl_scan(self, file_data):
|
||||
try:
|
||||
target_size, sim = tuple(self.pixels), {}
|
||||
image = self.preprocess_image(file_data, target_size)
|
||||
image_array = numpy.array(image).astype('float32') / 255.0
|
||||
image_expand = numpy.expand_dims(image_array, axis=0)
|
||||
for model_name, model in self.models.items():
|
||||
input_name = model.get_inputs()[0].name
|
||||
pre_answer = model.run(None, {input_name: image_expand})[0][0]
|
||||
number = numpy.argmax(pre_answer)
|
||||
label = self.labels[number].replace("\n", "")
|
||||
sim[label] = sim.setdefault(label, 0) + pre_answer[number]
|
||||
for local_label, sim_sum in sim.items():
|
||||
if sim_sum > len(self.models) / 2:
|
||||
local_level = sim_sum / len(self.models)
|
||||
print(local_label, local_level * 100)
|
||||
return local_label, local_level * 100
|
||||
return False, False
|
||||
except Exception as e:
|
||||
return False, False
|
||||
|
||||
def get_type(self, file_path):
|
||||
try:
|
||||
match_data = {}
|
||||
ftype = str(f".{file_path.split('.')[-1]}").lower()
|
||||
if ftype in [".exe", ".dll", ".sys", ".scr", ".com"]:
|
||||
with pefile.PE(file_path, fast_load=True) as pe:
|
||||
for section in pe.sections:
|
||||
section_name = section.Name.rstrip(b'\x00').decode('latin1')
|
||||
if (section.Characteristics & 0x00000020 and not
|
||||
any(shell in section_name.lower() for shell in self.shells)):
|
||||
match_data[section_name] = section.get_data()
|
||||
elif ftype in [".bat", ".vbs", ".ps1", ".cmd", ".js"]:
|
||||
with open(file_path, 'rb') as file:
|
||||
match_data[ftype] = file.read()
|
||||
return match_data
|
||||
except:
|
||||
return {}
|
||||
|
||||
def preprocess_image(self, file_data, target_size):
|
||||
file_data = numpy.frombuffer(file_data, dtype=numpy.uint8)
|
||||
data_count = len(file_data)
|
||||
wah = int(numpy.ceil(numpy.sqrt((data_count + 2) // 3)))
|
||||
image_array = numpy.zeros((wah * wah * 3,), dtype=numpy.uint8)
|
||||
image_array[:data_count] = file_data
|
||||
image_array = image_array.reshape((wah, wah, 3))
|
||||
image = Image.fromarray(image_array)
|
||||
return image.resize(target_size, Image.Resampling.LANCZOS)
|
||||
@@ -1,8 +0,0 @@
|
||||
slist = [".exe",".dll",".com",".msi",".scr",
|
||||
".js",".bat",".cmd",".ps1",".vbs"]
|
||||
|
||||
alist = [".ppt",".pptx",".wps",".txt",".rtf",
|
||||
".pdf",".xls",".xlsx",".doc",".docx",
|
||||
".jpg",".jpeg",".png",".webp",".gif",
|
||||
".mp3",".wav",".aac",".ogg",".flac",
|
||||
".mp4",".avi",".mov",".wmv",".mkv"]
|
||||
@@ -1 +0,0 @@
|
||||
{"2024-02-11 11:48:42": ["f8eaca69", "f0f5732f", "1b02d2da", "9b83055e", "fa39258e", "ebad499a", "7e7275ce", "f9f96fde", "dc2bd521", "2e3086b1", "4cbbe367", "62a39640", "628691a4", "7feb71ad", "c8756155", "724103b9", "21bb3aef", "8b136daa", "d2668208", "5e47ce27", "55e78944", "ec90753b", "cb9e21ee", "55634643", "d1ad686f", "319e2db4", "632f4531", "ecf51f02", "57b1794e", "cf04dfb7", "68b4c29f", "776c99fe", "bafe8409", "07483ddf", "e4753bc3", "86f8c21f", "c069d7d5", "0513868a", "55433105", "a51343e5", "5dd1e0c9", "8b6a35fc", "b2c4204c", "736a55d1", "0e2d378e", "221b87e3", "62a348cf", "1f53d69f", "ac0b27eb", "bee130c7", "00b0d86d", "f1dc8325", "d1e142b8", "87074aa5", "2bd013a0", "d2528b9e", "d90657b4", "b16889df", "c21af82e", "e81da5d7", "0ae06db8", "a072f779", "6c48e028", "acf0fbaa", "846a7177", "97be1e02", "94c2d42c", "e1240e10", "ee0a9c21", "0facf2a6", "2beae172", "39ae5ad7", "6a0c7324", "f074f5b4", "e952305f", "c969fd9d", "9af5a01e", "14688765", "596a470f", "94691d9a", "f30de2e7", "191f1163", "bdcb5a86", "18b3bf16", "30739d24", "e91746a4", "36888e71", "e26dfd80", "d8261ac3", "1a5cb45a", "23191f29", "20cb7eec", "94497ba5", "ce095672", "acf3bb61", "94bff605", "aea0475c", "b6a46047", "f1ae2ce5", "f25e7c70", "4c626e62", "d4da4030", "35eeb9fc", "010bd7e6", "088b5c3d", "4e552f39", "234f232b", "be39b5c7", "4d57d439", "3efc231b", "e3e0254f", "cf88078b", "957e7561", "0157ab1a", "6d75bcaa", "fdf069cb", "a1895d33", "aebc3614", "43d61eab", "967929f9", "11b631fb", "fbe63639", "0593e9a2", "c838e850", "a33c2ab4", "fa8ceeae", "71fa160a", "05178537", "f1bde64f", "30547b8f", "7fe931dd", "5dea0cda", "af0d6ebb", "f242ebc1", "ef2ac9f8", "09082309", "85a4b8a4", "65284f49", "cf215013", "6be2182a", "39d583d4", "e65f4785", "3cbb09cf", "73b78451", "61099a43", "1fe35f2e", "690b5995", "19d85999", "fcaa2063", "522ec9f6", "dfea1c9a", "1e54fc8c", "3d19c3b6", "13102764", "f0949aca", "7782a5e0", "a141f55e", "16eb1d17", "f14e284b", "3c36ae8e", "44349994", "0077b966", "8d8e66bb", "26dbaaa7", "69134125", "6be14646", "d4afaff6", "10c1954f", "07687215", "18b6668e", "295e94f1", "4beef072", "15bbc35a", "833b1998", "b81c15eb", "d0c36eb5", "30ff5635", "23edb694", "b5f2dd11", "9542f014", "2ba7934b", "8ac3e370", "be5348af", "2f7ca0b7", "c11f9756", "72646e9e", "ebaa875f", "d8efdadd", "cea3f4a5", "8f74e253", "c8ee6a44", "29a60790", "b6ed92dc", "022ab8d8", "f45011dd", "5606be13", "9fe86003", "c90d1128", "7bf6f523", "5dc456d1", "d41f3fb7", "839f31ff", "72e25499", "d0008616", "d6d13cfd", "018b8805", "3bd56a87", "7bf71a77", "302c6754", "639a51eb", "3025c6b7", "b233ddd9", "9297a1cb", "c10f2cf6", "a0a8dfd1", "6399f135", "8d394492", "d786ef37", "f516133b", "b71b7a0d", "a51484ee", "b6ec2abf", "184ccf63", "6cc57095", "897e3a5f", "5064bd10", "0abbe6f4", "57d2bb57", "3e3a904e", "cb25c53f", "35ebf1ea", "ec883603", "6c3d2e9a", "cd48542a", "e0b6a475", "1ed5d4af", "5cfe1ec3", "2f3f077c", "817d5bcb", "e7e4805a", "a8ac4be7", "3ae3b681", "781b603d", "99e3aca7", "d3cb5549", "e4e549d2", "eda8c8fd", "5a34fc94", "35385307", "b47d2a97", "8c0d1b23", "5529b024", "068c506c", "41858343", "861a909a", "96471e95", "a2b9d78f", "97255487", "506d0366", "7c5e3180", "e1aee43f", "99ad8db1", "1f4f4ab1", "cc431464", "cffd3e92", "ece85b50", "de6d3489", "9425f525", "c9dfa23f", "a97155f3", "002e23f2", "d440e8ed", "08798831", "96474097", "34962f83", "979532a1", "31f03b48", "5b692416", "c56d5e02", "5c2a1c1e", "6d642743", "fb15345a", "1bf7af93", "bb94e602", "4492b29b", "355885b6", "1e62932b", "f1bede8b", "6104f9a3", "86a6529d", "971f7f79", "8ace816a", "86a8a864", "4f85c567", "333b7df1", "cebe043f", "aa818d5e", "5458e526", "5354fc59", "14238173", "4794d596", "bd2797bd", "7e5013a9", "4211942c", "8c919cb4", "39bae570", "c8476924", "59d0bcc8", "29a47420", "62145122", "0b95337c", "55cd1300", "6fec3fac", "7abd0227", "ec842bbb", "f60b523e", "8ec73106", "e29225d6", "54224ade", "d722b746", "9342c1e3", "ce494c91", "4c1e1a2e", "20879280", "1c623712", "0ab6b9b5", "3cbe70c8", "090a5016", "1176c81f", "c4ca6358", "0ac1e588", "327018cc", "1aa3b54f", "9d8ed7e1", "98ecee4c", "1250f47d", "b48f6dcc", "2fd8a8a8", "df5292b9", "43ca2196", "eabebfd0", "5ef75e18", "6043426b", "5668ab16", "5694217b", "8da2c149", "8e108bc2", "4c44a17c", "ccdbc95c", "d578162e", "a828b92d", "226217c3", "5008e44f", "6ff4ce20", "10f2a2b1", "ee6b50e6", "1bc9bab0", "a69a2aba", "9dbfcd08", "539bc501", "640f2927", "e7e38d5e", "43adb03a", "7033ad33", "a98e1d1d", "19c928b8", "20fcecfd", "2038f57b", "1938493f", "47a32506", "6aa98b23", "051020bf", "4f5a3b25", "34d7276a", "79f68a23", "5b28a176", "15826bb9", "6a2eaaab", "23269a41", "79d85fa6", "51fe1954", "8f737801", "44dde6a5", "f8b69084", "136c1369", "086c7679", "0016c379", "2fe5822d", "1b146d77", "ff778b87", "6357bd68", "95840477", "c605b02a", "d9e4a2da", "1488771c", "1d067fed", "6c1c79f2", "4ce7e503", "c0d7b8fb", "ef0a1059", "f8984bae", "c9f98890", "f4eb7828", "5e570d46", "9ea12215", "de09d16e", "a470767a", "8c43a7fe", "65f145c0", "e425c385", "51453f5f", "fbca4af8", "5f213b95", "a6e2669f", "0d8e3Line truncated
|
||||
+35
-35
@@ -1569,49 +1569,49 @@ class Ui_MainWindow(object):
|
||||
self.Language_illustrate.raise_()
|
||||
self.Language_Choose_widget.raise_()
|
||||
self.Language_title.raise_()
|
||||
self.Show_cloud_services = QtWidgets.QWidget(self.Setting_widget)
|
||||
self.Show_cloud_services.setGeometry(QtCore.QRect(30, 130, 781, 81))
|
||||
self.Show_cloud_services.setAcceptDrops(False)
|
||||
self.Show_cloud_services.setAutoFillBackground(False)
|
||||
self.Show_cloud_services.setObjectName("Show_cloud_services")
|
||||
self.cloud_services_title = QtWidgets.QLabel(self.Show_cloud_services)
|
||||
self.cloud_services_title.setGeometry(QtCore.QRect(20, 10, 451, 31))
|
||||
self.Show_extension_kit = QtWidgets.QWidget(self.Setting_widget)
|
||||
self.Show_extension_kit.setGeometry(QtCore.QRect(30, 130, 781, 81))
|
||||
self.Show_extension_kit.setAcceptDrops(False)
|
||||
self.Show_extension_kit.setAutoFillBackground(False)
|
||||
self.Show_extension_kit.setObjectName("Show_extension_kit")
|
||||
self.extension_kit_title = QtWidgets.QLabel(self.Show_extension_kit)
|
||||
self.extension_kit_title.setGeometry(QtCore.QRect(20, 10, 451, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Microsoft YaHei")
|
||||
font.setPointSize(17)
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
|
||||
self.cloud_services_title.setFont(font)
|
||||
self.cloud_services_title.setStyleSheet("color: rgb(70,70,70);")
|
||||
self.cloud_services_title.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
||||
self.cloud_services_title.setObjectName("cloud_services_title")
|
||||
self.cloud_services_illustrate = QtWidgets.QLabel(self.Show_cloud_services)
|
||||
self.cloud_services_illustrate.setGeometry(QtCore.QRect(20, 40, 451, 31))
|
||||
self.extension_kit_title.setFont(font)
|
||||
self.extension_kit_title.setStyleSheet("color: rgb(70,70,70);")
|
||||
self.extension_kit_title.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
||||
self.extension_kit_title.setObjectName("extension_kit_title")
|
||||
self.extension_kit_illustrate = QtWidgets.QLabel(self.Show_extension_kit)
|
||||
self.extension_kit_illustrate.setGeometry(QtCore.QRect(20, 40, 451, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Microsoft YaHei")
|
||||
font.setPointSize(11)
|
||||
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
|
||||
self.cloud_services_illustrate.setFont(font)
|
||||
self.cloud_services_illustrate.setStyleSheet("color: rgb(70,70,70);")
|
||||
self.cloud_services_illustrate.setScaledContents(False)
|
||||
self.cloud_services_illustrate.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
||||
self.cloud_services_illustrate.setWordWrap(True)
|
||||
self.cloud_services_illustrate.setObjectName("cloud_services_illustrate")
|
||||
self.cloud_services_switch_Button = QtWidgets.QPushButton(self.Show_cloud_services)
|
||||
self.cloud_services_switch_Button.setGeometry(QtCore.QRect(660, 20, 91, 31))
|
||||
self.extension_kit_illustrate.setFont(font)
|
||||
self.extension_kit_illustrate.setStyleSheet("color: rgb(70,70,70);")
|
||||
self.extension_kit_illustrate.setScaledContents(False)
|
||||
self.extension_kit_illustrate.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
||||
self.extension_kit_illustrate.setWordWrap(True)
|
||||
self.extension_kit_illustrate.setObjectName("extension_kit_illustrate")
|
||||
self.extension_kit_switch_Button = QtWidgets.QPushButton(self.Show_extension_kit)
|
||||
self.extension_kit_switch_Button.setGeometry(QtCore.QRect(660, 20, 91, 31))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.cloud_services_switch_Button.sizePolicy().hasHeightForWidth())
|
||||
self.cloud_services_switch_Button.setSizePolicy(sizePolicy)
|
||||
sizePolicy.setHeightForWidth(self.extension_kit_switch_Button.sizePolicy().hasHeightForWidth())
|
||||
self.extension_kit_switch_Button.setSizePolicy(sizePolicy)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Microsoft YaHei")
|
||||
font.setPointSize(11)
|
||||
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
|
||||
self.cloud_services_switch_Button.setFont(font)
|
||||
self.cloud_services_switch_Button.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||
self.cloud_services_switch_Button.setStyleSheet("QPushButton\n"
|
||||
self.extension_kit_switch_Button.setFont(font)
|
||||
self.extension_kit_switch_Button.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||
self.extension_kit_switch_Button.setStyleSheet("QPushButton\n"
|
||||
"{\n"
|
||||
" border:none;\n"
|
||||
" background-color:rgb(230,230,230);\n"
|
||||
@@ -1622,12 +1622,12 @@ class Ui_MainWindow(object):
|
||||
" background-color:rgb(220,220,220);\n"
|
||||
"}\n"
|
||||
"")
|
||||
self.cloud_services_switch_Button.setIconSize(QtCore.QSize(16, 16))
|
||||
self.cloud_services_switch_Button.setCheckable(False)
|
||||
self.cloud_services_switch_Button.setObjectName("cloud_services_switch_Button")
|
||||
self.cloud_services_illustrate.raise_()
|
||||
self.cloud_services_switch_Button.raise_()
|
||||
self.cloud_services_title.raise_()
|
||||
self.extension_kit_switch_Button.setIconSize(QtCore.QSize(16, 16))
|
||||
self.extension_kit_switch_Button.setCheckable(False)
|
||||
self.extension_kit_switch_Button.setObjectName("extension_kit_switch_Button")
|
||||
self.extension_kit_illustrate.raise_()
|
||||
self.extension_kit_switch_Button.raise_()
|
||||
self.extension_kit_title.raise_()
|
||||
self.Setting_Back = QtWidgets.QPushButton(self.Setting_widget)
|
||||
self.Setting_Back.setGeometry(QtCore.QRect(25, 10, 101, 41))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
||||
@@ -1885,9 +1885,9 @@ class Ui_MainWindow(object):
|
||||
self.Language_English.setText(_translate("MainWindow", "English"))
|
||||
self.Language_Traditional_Chinese.setText(_translate("MainWindow", "繁體中文"))
|
||||
self.Language_Simplified_Chinese.setText(_translate("MainWindow", "简体中文"))
|
||||
self.cloud_services_title.setText(_translate("MainWindow", "雲端掃描服務"))
|
||||
self.cloud_services_illustrate.setText(_translate("MainWindow", "啟用此選項可以連接雲端掃描服務"))
|
||||
self.cloud_services_switch_Button.setText(_translate("MainWindow", "已關閉"))
|
||||
self.extension_kit_title.setText(_translate("MainWindow", "雲端掃描服務"))
|
||||
self.extension_kit_illustrate.setText(_translate("MainWindow", "啟用此選項可以連接雲端掃描服務"))
|
||||
self.extension_kit_switch_Button.setText(_translate("MainWindow", "已關閉"))
|
||||
self.Setting_Back.setText(_translate("MainWindow", "返回"))
|
||||
self.Add_White_list_title.setText(_translate("MainWindow", "增加到白名單"))
|
||||
self.Add_White_list_illustrate.setText(_translate("MainWindow", "此選項可以選擇檔案並增加到白名單"))
|
||||
|
||||
+22
-16
@@ -4,7 +4,7 @@ translate_dict = {
|
||||
"軟體":"软件","檔案":"文件","確定":"确认","設定":"设置","關於":"关于",
|
||||
"錯誤":"错误","實時":"实时","發現":"发现","關閉":"关闭","裝置":"设备",
|
||||
"總數":"总数","註冊":"注册","圖標":"图标","路徑":"路径","網路":"网络",
|
||||
"位元":"字节","彈窗":"弹窗","靈敏":"敏感","誤報":"误报","複製":"复制",
|
||||
"位元":"字节","彈窗":"弹窗","靈敏":"敏感","複製":"复制","開啟":"开启",
|
||||
"訊":"讯","項":"项","掃":"扫","試":"试","黃":"黄","嗎":"吗","防":"保",
|
||||
"鑰":"钥","當":"当","後":"后","護":"护","導":"导","區":"区","復":"复",
|
||||
"攔":"拦","請":"请","統":"统","刪":"删","進":"进","個":"个","選":"选",
|
||||
@@ -14,25 +14,27 @@ translate_dict = {
|
||||
"稱":"称","類":"类","輸":"输","執":"执","數":"数","尋":"寻","網":"网",
|
||||
"詢":"询","製":"制","員":"员","許":"许","條":"条","藍":"蓝","紅":"红",
|
||||
"綠":"绿","態":"态","務":"务","連":"连","檢":"检","測":"测","關":"关",
|
||||
"強":"强","驅":"驱","為":"为","腳":"脚","增":"增","單":"单","開":"开",
|
||||
"惡":"恶","據":"据","庫":"库","經":"经","敗":"败"},
|
||||
"強":"强","驅":"驱","為":"为","腳":"脚","單":"单","開":"开","擴":"扩",
|
||||
"惡":"恶","據":"据","庫":"库","經":"经","敗":"败","謝":"谢","別":"别",
|
||||
"載":"载","誤":"误","報":"报","鏈":"链","竄":"窜","蹤":"踪","記憶體":"内存",},
|
||||
"en_US": {"已開啟":"On","已關閉":"Off","已开启":"On","已关闭":"Off",",":", ",
|
||||
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website",
|
||||
"惡意檔案":"Virus ","惡意軟體":"Malware ","勒索行為":"Ransom ",
|
||||
"惡意腳本":"Script ","惡意行為":"Behavior ","可疑軟體":"Suspicious ",
|
||||
"許可條款":"License Terms","惡意":"Malicious","可疑":"Suspicious",
|
||||
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website ",
|
||||
"腳本":"Script ","鏈式":"Chain ","記憶體":"Memory ","加載":"Load ",
|
||||
"行為":"Behavior ","可疑":"Suspicious ","勒索":"Ransom ",
|
||||
"許可條款":"License Terms ","惡意":"Malicious","可疑":"Suspicious",
|
||||
"啟用":"Enable ","禁用":"Disable ","正在初始化中":"Initializing ",
|
||||
"正在掃描":"Scanning ","正在刪除":"Deleting ","最小化到":"Minimize To ",
|
||||
"確定要":"Sure Want To ","靈敏度":"Sensitivity ","更新":"Update ",
|
||||
"正在掃描":"Scanning ","正在刪除":"Deleting ","正在追蹤":"Tracking ",
|
||||
"最小化到":"Minimize To ","靈敏度":"Sensitivity ","正在檢查":"Checking ",
|
||||
"確定要":"Sure Want To ","引擎靈敏度":"Sensitivity ","更新":"Update ",
|
||||
"白色主題":"White","黃色主題":"Yellow","紅色主題":"Red","語言":"Language ",
|
||||
"藍色主題":"Blue","綠色主題":"Green","自定主題":"Custom","最新":"Latest ",
|
||||
"測試人員":"Testers","版本資訊":"Information","通訊":"Communication ",
|
||||
"特別感謝":"Contributors ","版本資訊":"Information","通訊":"Connect ",
|
||||
"註冊表":"Registry ","退出":"Quit ","檔案":"File ","當前":"Currently ",
|
||||
"狀態":"State ","掃描":"Scan ","工具":"Tools ","防護":"Protect ",
|
||||
"失敗":"Failed ","請":"Please ","路徑":"Path ","方式":"Method ",
|
||||
"需要":"Need ","病毒":"Virus ","選擇":"Select ","返回":"Back",
|
||||
"受到":"Been ","錯誤":"Error","完成":"Complete ","引擎":"Engine ",
|
||||
"托盤":"Tray ","圖標":"Icon ","不安全":"Unsafe","增強":"Enhanced ",
|
||||
"托盤":"Tray ","圖標":"Icon ","不安全":"Unsafe","增強":"Enhance ",
|
||||
"系統":"System ","雲端":"Cloud ","重啟":"Reboot ","修復":"Repair ",
|
||||
"裝置":"Device ","發現":"Found ","成功":"Success ","清理":"Cleanup ",
|
||||
"確定":"OK","執行":"Execute ","警告":"Warning ","使用":"Use ",
|
||||
@@ -44,11 +46,15 @@ translate_dict = {
|
||||
"風險":"Risk ","介面":"GUI ","核心":"Core ","服務":"Services ",
|
||||
"管理":"Manage","所有":"All ","您":"You ","取消":"Cancel ","未":"Not ",
|
||||
"垃圾":"Junk ","位元":"byte ","本機":"Computer ","停止":"Stop ",
|
||||
"增加到":"Add File To ","白名單":"White List ","軟體":"Software ",
|
||||
"增加":"Add","移除":"Delete","項目":"Items ","生成":"Create ","稱":"",
|
||||
"增加到":"Add To ","白名單":"White List ","軟體":"Software ","正在":"",
|
||||
"增加":"Add ","移除":"Delete","項目":"Items ","生成":"Create ","稱":"",
|
||||
"複製":"Copy ","開啟":"Open ","此":"This ","並":"And ","全盤":"Full ",
|
||||
"已經是":"Already ","數據庫":"Database ","誤報":"False Positive ",
|
||||
"已經在":"Already ","數據庫":"Database ","誤報":"False Positive ",
|
||||
"高":"High ","新":"New ","和":"And ","可能會":"Possible ","會":"Can ",
|
||||
"日誌":"Log","已":"Has ","彈窗":"Window ","要":"To ","驅動":"Drive ",
|
||||
"日誌":"Log","已":"Has ","彈窗":"Window ","要":"To ","驅動":"Driver ",
|
||||
"的":"","顯示":"","個":"","嗎":"","中":"","了":"","行":"","立即":"",
|
||||
"密鑰":"Key ","檢測":"Detect ","製作":"Make"," ":" "}}
|
||||
"密鑰":"Key ","檢測":"Detect ","製作":"Maker ","運行":"Running",
|
||||
"擴展":"Extension ","套件":"Kit ","自動":"Auto ","上報":"Report ",
|
||||
"分析":"Analysis ","自身":"Self ","其他":"Other ","配置":"Config ",
|
||||
"丟失":"Lost ","網站":"Website ","不兼容":"Not Compatible ",
|
||||
"竄改":"Tamper ","第三方":"Other ","與":"With "," ":" "}}
|
||||
@@ -0,0 +1,12 @@
|
||||
slist = [".exe",".dll",".sys",".com",".scr",
|
||||
".bat",".ps1",".vbs",".cmd",".js"]
|
||||
|
||||
alist = [".exe",".dll",".sys",".com",".scr",
|
||||
".zip",".7z",".rar",".tar",".gz",
|
||||
".js",".bat",".cmd",".ps1",".vbs",
|
||||
".ppt",".pptx",".wps",".txt",".rtf",
|
||||
".pdf",".xls",".xlsx",".doc",".docx",
|
||||
".jpg",".jpeg",".png",".webp",".gif",
|
||||
".mp3",".wav",".aac",".ogg",".flac",
|
||||
".mp4",".avi",".mov",".wmv",".mkv",
|
||||
".aux",".cur",".mui",".ttf",".efi"]
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
import pyinstaller_versionfile
|
||||
|
||||
pyinstaller_versionfile.create_versionfile(
|
||||
output_file="versionfile.txt",
|
||||
version='3.0.3',
|
||||
version='3.2.1',
|
||||
company_name="PYAS Security",
|
||||
file_description="Python Antivirus Software",
|
||||
internal_name="PYAS",
|
||||
|
||||
@@ -1,151 +1,53 @@
|
||||
# PYAS (Python Antivirus Software)
|
||||
|
||||

|
||||

|
||||
|
||||
## File Information
|
||||
## Readme Language
|
||||
|
||||
PYAS.py -> Main PYAS Program (including animation, scanning, protection functions, etc.)
|
||||
繁體中文 : https://github.com/87owo/PYAS/blob/main/README_zh_TW.md
|
||||
|
||||
PYAS_Compress.py -> Conversion Database (used to convert database dict and list to and from each other)
|
||||
|
||||
PYAS_Extension.py -> File Extension (including scanned file extensions and common file extensions)
|
||||
|
||||
PYAS_Function.* -> Virus Database (the virus database must be placed in the same directory)
|
||||
|
||||
PYAS_Interface.py -> PyQt5 Interface (designed by QT designer, must be matched with the main program)
|
||||
|
||||
PYAS_Resource.py -> PyQt5 Resource (status pictures, icon packages, button icons, etc.)
|
||||
|
||||
PYAS_Language.py -> Translate Dict (Traditional Chinese, Simplified Chinese, English)
|
||||
|
||||
PYAS_Version.py -> Pyinstaller Info (file information, version information, original name, etc.)
|
||||
简体中文 : https://github.com/87owo/PYAS/blob/main/README_zh_CN.md
|
||||
|
||||
## Requirements
|
||||
|
||||
Use pip install requirements to install import module
|
||||
|
||||
```
|
||||
psutil==5.9.5
|
||||
pefile==2023.2.7
|
||||
requests==2.31.0
|
||||
pyperclip==1.8.2
|
||||
pywin32==306
|
||||
PyQt5==5.15.9
|
||||
pip install psutil==5.9.5
|
||||
pip install pefile==2023.2.7
|
||||
pip install requests==2.31.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install pywin32==306
|
||||
pip install PyQt5==5.15.9
|
||||
pip install yara-python==4.5.1
|
||||
pip install numpy==2.1.1
|
||||
pip install onnxruntime==1.18.1
|
||||
pip install pillow==10.4.0
|
||||
```
|
||||
|
||||
## Hash Scanning
|
||||
|
||||
Use Qihoo 360 cloud service to scan known malicious files
|
||||
## File Information
|
||||
|
||||
```
|
||||
import hashlib, requests
|
||||
import xml.etree.ElementTree as xmlet
|
||||
|
||||
def hash_scan(file):
|
||||
try:
|
||||
with open(file, "rb") as f:
|
||||
text = str(hashlib.md5(f.read()).hexdigest())
|
||||
strBody = f'-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="md5s"\r\n\r\n{text}\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="format"\r\n\r\nXML\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="product"\r\n\r\n360zip\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="combo"\r\n\r\n360zip_main\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="v"\r\n\r\n2\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="osver"\r\n\r\n5.1\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="vk"\r\n\r\na03bc211\r\n-------------------------------7d83e2d7a141e\r\nContent-Disposition: form-data; name="mid"\r\n\r\n8a40d9eff408a78fe9ec10a0e7e60f62\r\n-------------------------------7d83e2d7a141e--'
|
||||
response = requests.post('http://qup.f.360.cn/file_health_info.php', data=strBody, timeout=3)
|
||||
if response.status_code == 200:
|
||||
level = float(xmlet.fromstring(response.text).find('.//e_level').text)
|
||||
if level > 50:
|
||||
return "Virus"
|
||||
elif level <= 10:
|
||||
return "Safe"
|
||||
return "Unknown"
|
||||
return f"Error: {response.status_code}"
|
||||
except Exception as e:
|
||||
return f"Error: {e}"
|
||||
|
||||
info = hash_scan("path to file")
|
||||
print(info)
|
||||
```
|
||||
|
||||
## Pefile Scanning
|
||||
|
||||
Get the pefile file function import table for scanning
|
||||
|
||||
```
|
||||
import pefile
|
||||
|
||||
def pe_scan(file):
|
||||
try:
|
||||
fn = []
|
||||
with pefile.PE(file) as pe:
|
||||
for entry in pe.DIRECTORY_ENTRY_IMPORT:
|
||||
for func in entry.imports:
|
||||
try:
|
||||
fn.append(str(func.name, "utf-8"))
|
||||
except:
|
||||
pass
|
||||
if fn in known_malicious_list:
|
||||
return "Virus"
|
||||
return "Safe"
|
||||
return "Unknown"
|
||||
except Exception as e:
|
||||
return f"Error: {e}"
|
||||
|
||||
info = pe_scan("path to file")
|
||||
print(info)
|
||||
```
|
||||
|
||||
## Process Detect
|
||||
|
||||
Show the new process name, file path, cmd line, pid
|
||||
|
||||
```
|
||||
import psutil, time
|
||||
|
||||
def proc_detect():
|
||||
existing_processes = set()
|
||||
for p in psutil.process_iter():
|
||||
if p.pid not in existing_processes:
|
||||
existing_processes.add(p.pid)
|
||||
while True:
|
||||
time.sleep(0.1)
|
||||
for p in psutil.process_iter():
|
||||
try:
|
||||
if p.pid not in existing_processes:
|
||||
existing_processes.add(p.pid)
|
||||
name, file, cmd = p.name(), p.exe(), p.cmdline()
|
||||
print(f"Name: {name}")
|
||||
print(f"File: {file}")
|
||||
print(f"Pid: {p.pid}")
|
||||
print(f"Cmd: {cmd}")
|
||||
except:
|
||||
pass
|
||||
|
||||
proc_detect()
|
||||
```
|
||||
|
||||
## File Detect
|
||||
|
||||
Monitor file changes under the specified path
|
||||
|
||||
```
|
||||
import os, win32file, win32con
|
||||
|
||||
def file_detect(path):
|
||||
hDir = win32file.CreateFile(path,win32con.GENERIC_READ,win32con.FILE_SHARE_READ|win32con.FILE_SHARE_WRITE|win32con.FILE_SHARE_DELETE,None,win32con.OPEN_EXISTING,win32con.FILE_FLAG_BACKUP_SEMANTICS,None)
|
||||
while True:
|
||||
for action, file in win32file.ReadDirectoryChangesW(hDir,10485760,True,win32con.FILE_NOTIFY_CHANGE_FILE_NAME|win32con.FILE_NOTIFY_CHANGE_DIR_NAME|win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES|win32con.FILE_NOTIFY_CHANGE_SIZE|win32con.FILE_NOTIFY_CHANGE_LAST_WRITE|win32con.FILE_NOTIFY_CHANGE_SECURITY,None,None):
|
||||
try:
|
||||
fpath = os.path.join(path, file)
|
||||
if action == 1:
|
||||
print(f"File Create: {fpath}")
|
||||
elif action == 2:
|
||||
print(f"File Delete: {fpath}")
|
||||
elif action == 3:
|
||||
print(f"File Modify: {fpath}")
|
||||
elif action == 4:
|
||||
print(f"File Rename: {fpath}")
|
||||
elif action == 5:
|
||||
print(f"File Rename: {fpath}")
|
||||
except:
|
||||
pass
|
||||
|
||||
file_detect("path")
|
||||
PYAS/
|
||||
├── Driver/
|
||||
│ ├── PYAS_Driver.sys -------> Driver Protect (self protection driver for pyas by 0sha0)
|
||||
│ └── ...
|
||||
│
|
||||
├── Model/
|
||||
│ ├── PYAS_Model.json -------> Virus Database (the database must be in the specified dir)
|
||||
│ └── ...
|
||||
│
|
||||
├── Rules/
|
||||
│ ├── Yara_Rules.yar ---------> Yara Rules (yara rules in plain text format)
|
||||
│ ├── Yara_Rules.yrc ---------> Compile Rules (yara rules in compiled format)
|
||||
│ └── ...
|
||||
│
|
||||
├── PYAS.py ---------------------> Main PYAS Program (including animation, scan, protect functions, ...)
|
||||
├── PYAS_Engine.py -------------> Conversion Database (used to transform profiles and forecast data)
|
||||
├── PYAS_Suffixes.py -----------> File Suffixes (including scanned file suffixes and common suffixes)
|
||||
├── PYAS_Interface.py ----------> PyQt5 Interface (use QT designer, must be matched with the main program)
|
||||
├── PYAS_Resource.py -----------> PyQt5 Resource (status pictures, icon packages, button icons, ...)
|
||||
├── PYAS_Language.py -----------> Translate Dict (Traditional Chinese, Simplified Chinese, English)
|
||||
├── PYAS_Version.py ------------> Pyinstaller (file information, version information, original name, ...)
|
||||
└── ...
|
||||
```
|
||||
|
||||
## Official Website
|
||||
@@ -154,17 +56,26 @@ https://pyantivirus.wixsite.com/pyas
|
||||
|
||||
https://github.com/87owo/PYAS
|
||||
|
||||
## Microsoft Runtime
|
||||
|
||||
https://github.com/87owo/Microsoft_Runtime/releases
|
||||
|
||||
## PYAS Driver
|
||||
|
||||
https://github.com/0sha0/PYAS_Protection
|
||||
|
||||
## MIT license
|
||||
|
||||
https://github.com/87owo/PYAS/blob/main/LICENSE.md
|
||||
|
||||
## Support System
|
||||
|
||||
Windows 8.1, 10, 11 (64-bit), Ram 1GB, Rom 1GB or higher
|
||||
Windows 8.1, 10, 11 (64-bit), Ram 500MB, Rom 200MB or higher
|
||||
|
||||
Other systems may experience software malfunctions or crash
|
||||
|
||||
## Special Thanks
|
||||
360, Wix, VirusShare, mtkiao129, AV-T Team of LisectGroup
|
||||
|
||||
Wix, 0sha0, mtkiao129, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
@@ -0,0 +1,75 @@
|
||||
# PYAS (Python 杀毒软件)
|
||||
|
||||

|
||||
|
||||
## 安装要求
|
||||
|
||||
```
|
||||
pip install psutil==5.9.5
|
||||
pip install pefile==2023.2.7
|
||||
pip install requests==2.31.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install pywin32==306
|
||||
pip install PyQt5==5.15.9
|
||||
pip install yara-python==4.5.1
|
||||
pip install numpy==2.1.1
|
||||
pip install onnxruntime==1.18.1
|
||||
pip install pillow==10.4.0
|
||||
```
|
||||
|
||||
## 文件信息
|
||||
|
||||
```
|
||||
PYAS/
|
||||
├── Driver/
|
||||
│ ├── PYAS_Driver.sys -------> 驱动程序 (0sha0 为 pyas 提供的自我保护驱动程序)
|
||||
│ └── ...
|
||||
│
|
||||
├── Model/
|
||||
│ ├── PYAS_Model.json -------> 病毒数据库 (数据库必须位于指定目录中)
|
||||
│ └── ...
|
||||
│
|
||||
├── Rules/
|
||||
│ ├── Yara_Rules.yar ---------> Yara 规则 (纯文本格式的 yara 规则)
|
||||
│ ├── Yara_Rules.yrc ---------> 编译规则 (编译格式的 yara 规则)
|
||||
│ └── ...
|
||||
│
|
||||
├── PYAS.py ---------------------> PYAS主程序(包含动画、扫描、保护等功能...)
|
||||
├── PYAS_Engine.py -------------> 转换数据库(用于转换剖面图和预报数据)
|
||||
├── PYAS_Suffixes.py -----------> 文件后缀(包含扫描文件后缀和常用后缀)
|
||||
├── PYAS_Interface.py ----------> PyQt5界面(使用QT设计器,需与主程序搭配使用)
|
||||
├── PYAS_Resource.py -----------> PyQt5资源(状态图片、图标包、按钮图标...)
|
||||
├── PYAS_Language.py -----------> 翻译词典(繁体中文、简体中文、英文)
|
||||
├── PYAS_Version.py ------------> 安裝信息(文件信息、版本信息、原名...)
|
||||
└── ...
|
||||
```
|
||||
|
||||
## 官方网页
|
||||
|
||||
https://pyantivirus.wixsite.com/pyas
|
||||
|
||||
https://github.com/87owo/PYAS
|
||||
|
||||
## 微软运行库
|
||||
|
||||
https://github.com/87owo/Microsoft_Runtime/releases
|
||||
|
||||
## 驱动程序
|
||||
|
||||
https://github.com/0sha0/PYAS_Protection
|
||||
|
||||
## 开源协议
|
||||
|
||||
https://github.com/87owo/PYAS/blob/main/LICENSE.md
|
||||
|
||||
## 支援系统
|
||||
|
||||
Windows 8.1, 10, 11 (64-bit), 内存 500MB, 存储 200MB 或更高
|
||||
|
||||
其他系统或版本可能会遇到软体功能故障或程序崩溃
|
||||
|
||||
## 特别感谢
|
||||
|
||||
360, Wix, VirusShare, mtkiao129, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
@@ -0,0 +1,75 @@
|
||||
# PYAS (Python 防毒軟體)
|
||||
|
||||

|
||||
|
||||
## 安裝要求
|
||||
|
||||
```
|
||||
pip install psutil==5.9.5
|
||||
pip install pefile==2023.2.7
|
||||
pip install requests==2.31.0
|
||||
pip install pyperclip==1.8.2
|
||||
pip install pywin32==306
|
||||
pip install PyQt5==5.15.9
|
||||
pip install yara-python==4.5.1
|
||||
pip install numpy==2.1.1
|
||||
pip install onnxruntime==1.18.1
|
||||
pip install pillow==10.4.0
|
||||
```
|
||||
|
||||
## 檔案資訊
|
||||
|
||||
```
|
||||
PYAS/
|
||||
├── Driver/
|
||||
│ ├── PYAS_Driver.sys -------> 驅動程式 (0sha0 為 pyas 提供的自我保護驅動程式)
|
||||
│ └── ...
|
||||
│
|
||||
├── Model/
|
||||
│ ├── PYAS_Model.json -------> 病毒資料庫 (資料庫必須位於指定目錄)
|
||||
│ └── ...
|
||||
│
|
||||
├── Rules/
|
||||
│ ├── Yara_Rules.yar ---------> Yara 規則 (純文字格式的 yara 規則)
|
||||
│ ├── Yara_Rules.yrc ---------> 編譯規則 (編譯格式的 yara 規則)
|
||||
│ └── ...
|
||||
│
|
||||
├── PYAS.py ---------------------> PYAS主程式(包含動畫、掃描、保護等功能...)
|
||||
├── PYAS_Engine.py -------------> 轉換資料庫(用於轉換剖面圖和預報資料)
|
||||
├── PYAS_Suffixes.py -----------> 文件後綴(包含掃描文件後綴和常用後綴)
|
||||
├── PYAS_Interface.py ----------> PyQt5介面(使用QT設計器,需與主程式搭配使用)
|
||||
├── PYAS_Resource.py -----------> PyQt5資源(狀態圖片、圖示包、按鈕圖示...)
|
||||
├── PYAS_Language.py -----------> 翻譯字典(繁體中文、簡體中文、英文)
|
||||
├── PYAS_Version.py ------------> 安裝資訊(檔案資訊、版本資訊、原名...)
|
||||
└── ...
|
||||
```
|
||||
|
||||
## 官方網頁
|
||||
|
||||
https://pyantivirus.wixsite.com/pyas
|
||||
|
||||
https://github.com/87owo/PYAS
|
||||
|
||||
## 微軟運行庫
|
||||
|
||||
https://github.com/87owo/Microsoft_Runtime/releases
|
||||
|
||||
## 驅動程式
|
||||
|
||||
https://github.com/0sha0/PYAS_Protection
|
||||
|
||||
## 開源協議
|
||||
|
||||
https://github.com/87owo/PYAS/blob/main/LICENSE.md
|
||||
|
||||
## 支援系統
|
||||
|
||||
Windows 8.1, 10, 11 (64-bit),記憶體 500MB, 磁碟容量 200MB 或更高
|
||||
|
||||
其他系統或版本可能會遇到軟體功能故障或程序崩潰
|
||||
|
||||
## 特別感謝
|
||||
|
||||
Wix, 0sha0, mtkiao129, AV-T Team of LisectGroup
|
||||
|
||||
Copyright© 2020~2024 PYAS Security By 87owo
|
||||
File diff suppressed because it is too large.
Load diff
+256387
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user