Skip to content

Commit

Permalink
change challenge shellscript check
Browse files Browse the repository at this point in the history
  • Loading branch information
zardus committed May 24, 2024
1 parent c8ed43b commit 02035e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chio.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def check_challenge_shellscript(process):
print_test("Checking to make sure the process is a non-interactive shell script running in /challenge.")

assert os.path.basename(process.exe()) in [ 'sh', 'bash' ], f"Process interpreter must be 'sh' or 'bash'. Yours is: {os.path.basename(process.exe())}"
assert len(process.cmdline()) == 2 and process.cmdline()[1].startswith("/challenge"), f"The shell process must be executing a shell script under /challenge! Yours is: {process.cmdline()[1]}"
assert len(process.cmdline()) == 2 and process.cmdline()[-1].startswith("/challenge"), f"The shell process must be executing a shell script under /challenge! Yours is: {process.cmdline()[1]}"

PROCESS_TYPE_CHECKERS = {
'python': check_python,
Expand Down

0 comments on commit 02035e9

Please sign in to comment.