def create_kmactf( ctf_name="KMActf", ctf_description="CTF description", name="admin", email="*****@*****.**", password="******", user_mode="users", setup=True, enable_plugins=False, application_root="/", config=TestingConfig, ): if enable_plugins: config.SAFE_MODE = False else: config.SAFE_MODE = True config.APPLICATION_ROOT = application_root url = make_url(config.SQLALCHEMY_DATABASE_URI) if url.database: url.database = str(uuid.uuid4()) config.SQLALCHEMY_DATABASE_URI = str(url) app = create_app(config) app.test_client_class = KMActfTestClient if setup: app = setup_kmactf( app, ctf_name=ctf_name, ctf_description=ctf_description, name=name, email=email, password=password, user_mode=user_mode, ) return app
parser.add_argument("--teams", help="Amount of teams to generate", default=10, type=int) parser.add_argument("--challenges", help="Amount of challenges to generate", default=20, type=int) parser.add_argument("--awards", help="Amount of awards to generate", default=5, type=int) args = parser.parse_args() app = create_app() mode = args.mode USER_AMOUNT = args.users TEAM_AMOUNT = args.teams if args.mode == "teams" else 0 CHAL_AMOUNT = args.challenges AWARDS_AMOUNT = args.awards categories = [ "Exploitation", "Reversing", "Web", "Forensics", "Scripting", "Cryptography", "Networking",