Skip to content

Commit

Permalink
fix chdiring
Browse files Browse the repository at this point in the history
  • Loading branch information
zardus committed Nov 13, 2024
1 parent 07f37eb commit 2e7e6a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pwnshop/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def handle_apply(args):
if args.debug:
pwnlib.context.context.log_level = "DEBUG"

yaml_dir = os.path.abspath(os.path.dirname(args.yaml))
y = yaml.safe_load(open(args.yaml))
for c in y['challenges']:
seed = c.get('seed', y.get('seed', args.seed))
Expand All @@ -176,7 +177,7 @@ def handle_apply(args):
basename=binary_name,
)

out_dir = os.path.abspath(f"{os.path.dirname(args.yaml)}/{c['id']}/_{v}")
out_dir = f"{yaml_dir}/{c['id']}/_{v}"
if os.path.exists(out_dir):
shutil.copytree(out_dir, challenge.work_dir, dirs_exist_ok=True)
else:
Expand Down

0 comments on commit 2e7e6a1

Please sign in to comment.