From 8c485f1573c67d992b308094ca016a6ed6564076 Mon Sep 17 00:00:00 2001 From: NicolasBouzin Date: Mon, 20 Apr 2026 20:38:07 +0200 Subject: [PATCH] Fixing TypeError in __init__.py --- src/pypackerdetect/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pypackerdetect/__init__.py b/src/pypackerdetect/__init__.py index 40407db..21129a8 100644 --- a/src/pypackerdetect/__init__.py +++ b/src/pypackerdetect/__init__.py @@ -75,8 +75,8 @@ def __add(i, msg): # the format "/[N]" where N is the offset in the string table ; in this case, we compute # the real section names and map them to the shortened ones to compare the relevant names # with the database of known section names - if re.match(r"^\/\d+$", n) and _real_section_names(pe.path, logger=self.logger): - n = _real_section_names[i] + if re.match(r"^\/\d+$", n) and (_rn := _real_section_names(pe.path, logger=self.logger)): + n = _rn[i] d['all'].append(n) if ep >= s.VirtualAddress and ep <= (s.VirtualAddress + s.Misc_VirtualSize): d['ep'].append(n)