Skip to content

Commit be4533a

Browse files
committed
Tweaks
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
1 parent 6f22091 commit be4533a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

blint/lib/binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def process_pe_resources(parsed_obj):
398398
if version_info:
399399
for k in ("file_info", "key", "type"):
400400
if hasattr(version_info, k):
401-
version_info_dict[k] = re.sub('\s+', ' ', str(getattr(version_info, k)))
401+
version_info_dict[k] = re.sub('\s+', ' ', str(getattr(version_info, k))).strip()
402402
resources = {
403403
"has_accelerator": rm.has_accelerator,
404404
"has_dialogs": rm.has_dialogs,

blint/lib/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ def extract_ar(ar_file: str, to_dir: str | None = None) -> list[str]:
660660
output.write(archive.open(entry, "rb").read())
661661
files_list.append(afile)
662662
except (ArchiveError, ValueError) as e:
663-
LOG.warning(f"Failed to extract {ar_file}: {e}")
663+
if e.args and "Unexpected magic" not in e.args[0]:
664+
LOG.warning(f"Failed to extract {ar_file}: {e}")
664665
return files_list
665666

666667

0 commit comments

Comments
 (0)