From 0b253cc7aa72fb8f4a4e276f223f87990452c7b1 Mon Sep 17 00:00:00 2001 From: qux-bbb <1147635419@qq.com> Date: Mon, 8 Apr 2024 08:45:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4base64=E6=AD=A3=E5=88=99?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=8C=B9=E9=85=8D=E5=A4=AA=E5=A4=9A=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xanalyzer/file.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xanalyzer/file.py b/xanalyzer/file.py index c22c7c7..efa6b4d 100644 --- a/xanalyzer/file.py +++ b/xanalyzer/file.py @@ -225,7 +225,7 @@ def get_special_strs(self): the_file = open(self.file_path, "rb") file_content = the_file.read() the_file.close() - tmp_base64_strs = re.findall(rb"[A-Za-z0-9+/]{2,}={0,2}", file_content) + tmp_base64_strs = re.findall(rb"[A-Za-z0-9+/]{6,}={1,2}", file_content) possible_base64_strs = [] for tmp_base64_str in tmp_base64_strs: # 过滤hex字符串 @@ -240,7 +240,10 @@ def get_special_wide_strs(self): the_file = open(self.file_path, "rb") file_content = the_file.read() the_file.close() - tmp_base64_strs = re.findall(rb"(?:[A-Za-z0-9+/]\x00){2,}(?:=\x00){0,2}", file_content) + tmp_base64_strs = re.findall( + rb"(?:[A-Za-z0-9+/]\x00){6,}(?:=\x00){1,2}", + file_content, + ) possible_base64_strs = [] for tmp_base64_str in tmp_base64_strs: # 过滤hex字符串