Skip to content

Commit

Permalink
update args to support images and have a sensical -o
Browse files Browse the repository at this point in the history
  • Loading branch information
zardus committed Nov 13, 2024
1 parent 1546783 commit 9dc79e6
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion pwnshop/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ def f_with_challenge(args):
for c in pwnshop.ALL_CHALLENGES.values()
]

if getattr(args, "build_image", None):
for c in challenges:
c.BUILD_IMAGE = args.build_image

if getattr(args, "verify_image", None):
for c in challenges:
c.VERIFY_IMAGE = args.verify_image

return f(args, challenges)
return f_with_challenge

Expand Down Expand Up @@ -206,6 +214,11 @@ def main():
help="Location to store needed library files",
)

command_build.add_argument(
"--build-image",
help="Docker image to use for building",
)

command_apply.add_argument(
"--no-verify",
action="store_true",
Expand Down Expand Up @@ -252,11 +265,21 @@ def main():
action="append"
)

command_verify.add_argument(
"--build-image",
help="Docker image to use for building",
)

command_verify.add_argument(
"--verify-image",
help="Docker image to use for verification",
)


# where to write
for c in [ command_render, command_build ]:
c.add_argument(
"-O",
"-o",
"--out",
type=argparse.FileType('w'),
default='-',
Expand Down

0 comments on commit 9dc79e6

Please sign in to comment.