Currently, in coercer/core/tasks/execute.py, the exploitation prompt expects only uppercase C, S, X as valid answers:
while next_action_answer not in ["C", "S", "X"]:
next_action_answer = input(
"Continue (C) | Skip this function (S) | Stop exploitation (X) ? "
)
if len(next_action_answer) > 0:
next_action_answer = (
next_action_answer.strip()[0].upper()
)
This can be frustrating for users who input c, s, or x (lowercase), as the loop does not accept those and they must re-enter their answer.
Suggested fix:
Make the prompt case-insensitive by always converting the first character to uppercase and checking accordingly. For example, update the while condition:
while next_action_answer not in ["C", "S", "X"]:
next_action_answer = input(
"Continue (C) | Skip this function (S) | Stop exploitation (X) ? "
)
if len(next_action_answer) > 0:
next_action_answer = next_action_answer.strip()[0].upper()
or even better, pre-normalize input for the check:
while True:
next_action_answer = input(
"Continue (C) | Skip this function (S) | Stop exploitation (X) ? "
)
if next_action_answer:
next_action_answer = next_action_answer.strip().upper()
if next_action_answer and next_action_answer[0] in ["C", "S", "X"]:
next_action_answer = next_action_answer[0]
break
This allows both lowercase and uppercase input, improving user experience.
File reference:
coercer/core/tasks/execute.py#L237
Currently, in
coercer/core/tasks/execute.py, the exploitation prompt expects only uppercase C, S, X as valid answers:This can be frustrating for users who input
c,s, orx(lowercase), as the loop does not accept those and they must re-enter their answer.Suggested fix:
Make the prompt case-insensitive by always converting the first character to uppercase and checking accordingly. For example, update the
whilecondition:or even better, pre-normalize input for the check:
This allows both lowercase and uppercase input, improving user experience.
File reference:
coercer/core/tasks/execute.py#L237