CTF::Util - Convenience functions for CTF contests.
There are certain things that need to be done regardless of the type of game that is being played. Things like setting the next flag, or reverting to an initial flag.
Because these tasks do not depend on the type of contest being run, they are in this utility module.
This method creates a copy of the flag that's passed in, modifies the 'content' and 'round' fields (in order to make it valid for the next round), and updates the flag on the contestant side.
This method is used in the event of a service capture, or a bogon. It creates a new flag based on the host and service we are currently connected to. If a team is specified, that team will be given control of the service. If not, the service is still scored, but the points are not awarded to any team.
This method returns a string suitable for use in the 'content' field of a CTF::Score::Flag object. The source of this data is configured in the CTF::Config using the flag_factory_class
parameter.
This method returns a list of ip addresses and/or hostnames that should be scanned each round.
This list comes from CTF::Config, as specified by the scan_targets
parameter. However, this method may be overridden to pull target information from another source.