Skip to content

Commit

Permalink
Allow provided connection_info in deploy (#121)
Browse files Browse the repository at this point in the history
* feat: allow provided `connection_info` in `deploy`

* Add some logging information to show that we will use hardcoded connection_info

* Fixes #120 

---------

Co-authored-by: Kevin Chung <[email protected]>
  • Loading branch information
pl4nty and ColdHeat authored Jul 27, 2023
1 parent faa8409 commit 1c11ea6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ctfcli/cli/challenges.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,15 @@ def deploy(self, challenge, host=None, protocol=None):
challenge=challenge, host=target_host, protocol=protocol,
)

challenge["connection_info"] = connect_info
# Use hardcoded connection_info if specified
connection_info = connect_info
if challenge.get("connection_info"):
click.secho(
"Using connection_info hardcoded in challenge.yml", fg="yellow",
)
connect_info = challenge.get("connection_info")

challenge["connection_info"] = connection_info

if status:
# Search for challenge
Expand Down

0 comments on commit 1c11ea6

Please sign in to comment.