Skip to content

Commit 1c11ea6

Browse files
pl4ntyColdHeat
andauthored
Allow provided connection_info in deploy (#121)
* 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]>
1 parent faa8409 commit 1c11ea6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ctfcli/cli/challenges.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,15 @@ def deploy(self, challenge, host=None, protocol=None):
339339
challenge=challenge, host=target_host, protocol=protocol,
340340
)
341341

342-
challenge["connection_info"] = connect_info
342+
# Use hardcoded connection_info if specified
343+
connection_info = connect_info
344+
if challenge.get("connection_info"):
345+
click.secho(
346+
"Using connection_info hardcoded in challenge.yml", fg="yellow",
347+
)
348+
connect_info = challenge.get("connection_info")
349+
350+
challenge["connection_info"] = connection_info
343351

344352
if status:
345353
# Search for challenge

0 commit comments

Comments
 (0)