From 7aadc350a3340b4a6417fa7a06748f67746127c2 Mon Sep 17 00:00:00 2001 From: Yan Date: Sat, 2 Nov 2024 23:24:44 -0700 Subject: [PATCH] strace fallback for compatibility --- pwnshop/__main__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pwnshop/__main__.py b/pwnshop/__main__.py index 1f09d32..175f11c 100644 --- a/pwnshop/__main__.py +++ b/pwnshop/__main__.py @@ -82,7 +82,12 @@ def verify_challenge(challenge, debug=False, flag=None, strace=False): with open("/flag", "wb") as f: f.write(flag.encode()) - challenge.verify(strace=strace) + try: + challenge.verify(strace=strace) + except TypeError as e: + if "strace" not in str(e): + raise + challenge.verify() def verify_many(args, challenges): failures = [ ]