<<

NAME

CTF::Util - Convenience functions for CTF contests.

ABSTRACT

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.

METHODS

set_next_flag( CTF::Contest, CTF::Flag, ServiceName)

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.

set_init_flag( CTF::Contest, IP addr, Service name, [CTF::Score::Team])

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.

mk_new_flag (none)

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.

get_scan_targets (none)

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.

<<

Unless otherwise noted, all content is copyright Marc Dougherty and is subject to a Creative Commons license.