Bugfix, plus some QoL upgrades from the Async branch
This commit is contained in:
+5
-1
@@ -44,7 +44,11 @@ def generate(api: AirlockAPIWrapper):
|
||||
print(colorText("Please select a duration in minutes: ", "white"))
|
||||
print(colorText("15 mins, 60 mins, 360 mins(6 Hours), 1440 mins (24 Hours), 10080 mins (7 Days):", "white"))
|
||||
duration_selected = Selector.select_int(possible_durations)
|
||||
if duration_selected:
|
||||
|
||||
if isinstance(duration_selected, list):
|
||||
duration_selected = duration_selected[0] if duration_selected else None
|
||||
|
||||
if duration_selected is not None:
|
||||
for agent in agents:
|
||||
otp_code = api.otp_generate(agent.agentid, duration_selected, purpose)
|
||||
logger.info(f"Generated OTP for {agent.hostname}: {otp_code}")
|
||||
|
||||
Reference in New Issue
Block a user