make ctf_api robust
Currently the ctf_api is sensitive to transient) network errors.
Eg. post_challenge
Have a try/except on the get_chall_id()
call but not on session.post()
If there is a network error happening between the get_chall_id and post it will not be caught.
There is also no retry so if any of the calls fail once there will be no retries. This is also the same situation for post_flag() This could lead to a situation that some of the flags for a user will not be posted.
Possible soluitions:
- catch all exceptions and handle them or propagate them to the calling function
- have a retry flag that retry to do the action (post etc) a configurable amount of tries/time
/cc @jonamagn
Edited by Jonas Karlsson