mirror of
https://github.com/p0dalirius/Coercer
synced 2026-08-09 13:01:12 +00:00
Refactor input handling for next action prompt, fixes #105
This commit is contained in:
@@ -232,16 +232,15 @@ def execute_tasks(
|
||||
and not options.always_continue
|
||||
):
|
||||
next_action_answer = None
|
||||
while next_action_answer not in ["C", "S", "X"]:
|
||||
while True:
|
||||
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()
|
||||
)
|
||||
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
|
||||
if next_action_answer == "C":
|
||||
pass
|
||||
elif next_action_answer == "S":
|
||||
|
||||
Reference in New Issue
Block a user