Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
87owo authored Nov 20, 2024
1 parent b5d90b5 commit dab0d6a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions PYAS.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self):
self.pyas = sys.argv[0].replace("\\", "/")
self.dir = os.path.dirname(self.pyas)
self.pyae_version = "AI Engine"
self.pyas_version = "3.2.5"
self.pyas_version = "3.2.6"
self.first_startup = True
self.init_tray_icon()
self.init_data_base()
Expand Down Expand Up @@ -922,7 +922,7 @@ def file_scan(self):
self.scan_thread.start()
while self.scan_thread.is_alive():
QApplication.processEvents()
self.answer_scan()
self.answer_scan()
except Exception as e:
self.bug_event(e)
self.virus_scan_break()
Expand All @@ -936,7 +936,7 @@ def path_scan(self):
self.scan_thread.start()
while self.scan_thread.is_alive():
QApplication.processEvents()
self.answer_scan()
self.answer_scan()
except Exception as e:
self.bug_event(e)
self.virus_scan_break()
Expand Down Expand Up @@ -1465,7 +1465,7 @@ def protect_file_thread(self):
notify_info = FILE_NOTIFY_INFORMATION.from_buffer_copy(buffer[0:])
raw_filename = notify_info.FileName[:notify_info.FileNameLength // 2]
fpath = f"C:/{raw_filename}".replace("\\", "/")
ftype = f".{fpath.split('.')[-1]}".lower()
ftype = os.path.splitext(fpath)[-1].lower()
if self.ransom_counts >= 5 and self.track_proc:
self.ransom_counts = 0
self.kill_process("勒索攔截", *self.track_proc)
Expand Down
6 changes: 3 additions & 3 deletions PYAS_Engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def __init__(self):

def load_rules(self, file_path):
try:
ftype = str(f".{file_path.split('.')[-1]}").lower()
ftype = os.path.splitext(file_path)[-1].lower()
if ftype in [".yara", ".yar"]:
self.rules[file_path] = yara.compile(file_path)
elif ftype in [".yc", ".yrc"]:
Expand Down Expand Up @@ -50,7 +50,7 @@ def __init__(self):

def load_model(self, file_path):
try:
ftype = str(f".{file_path.split('.')[-1]}").lower()
ftype = os.path.splitext(file_path)[-1].lower()
if ftype in [".json", ".txt"]:
with open(file_path, 'r') as f:
self.class_names = json.load(f)
Expand Down Expand Up @@ -92,7 +92,7 @@ def preprocess_image(self, file_data, target_size):

def get_type(self, file_path):
match_data = {}
ftype = str(f".{file_path.split('.')[-1]}").lower()
ftype = os.path.splitext(file_path)[-1].lower()
if ftype in self.suffix:
try:
with pefile.PE(file_path, fast_load=True) as pe:
Expand Down
2 changes: 1 addition & 1 deletion PYAS_Version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pyinstaller_versionfile.create_versionfile(
output_file="versionfile.txt",
version='3.2.5',
version='3.2.6',
company_name="PYAS Security",
file_description="Python Antivirus Software",
internal_name="PYAS",
Expand Down

0 comments on commit dab0d6a

Please sign in to comment.