diff --git a/pyinstxtractor-ng.py b/pyinstxtractor-ng.py index d5aa630..57e2f34 100644 --- a/pyinstxtractor-ng.py +++ b/pyinstxtractor-ng.py @@ -193,6 +193,11 @@ def parseTOC(self): ) name = name.decode("utf-8").rstrip("\0") + + # Prevent writing outside the extraction directory + if name.startswith("/"): + name = name.lstrip("/") + if len(name) == 0: name = str(uniquename()) print(