def startPublic(init): cip = ConfigIniParser() cip.addHandler(ServiceBotConfigHandler()) cip.addHandler(ServiceConfigHandler()) cip.addHandler(UsenixConfigHandler()) config_path = "config/usenix_public.ini" conf = cip.load(config_path) conf.setFlagPhrase("flags wave in the wind") assert(conf.isValid()) #Create Game Logic usenixlogic = UsenixPublicLogic(conf,init) #Create GameStateBot game_state_bot = GameStateBot(conf,usenixlogic) game_state_bot.start() time.sleep(1) #Create ServiceBot servicebot = ServiceBot(conf,init) servicebot.start() #Create UsenixReportBot reportbot = UsenixReportBot(conf,8081) reportbot.start() servicebot.join() reportbot.join() game_state_bot.join()
def startAll(init): #Setup config cip = ConfigIniParser() cip.addHandler(ServiceBotConfigHandler()) cip.addHandler(ServiceConfigHandler()) cip.addHandler(UsenixConfigHandler()) cip.addHandler(UsenixExploitConfigHandler()) #cip.addHandler(AttackConfigHandler(False)) #Load conf file config_path = "config/usenix.ini" conf = cip.load(config_path) #Temporary hack - this should be in config file.. conf.setFlagPhrase("flags wave in the wind") assert(conf.isValid()) #Create Game Logic usenixlogic = UsenixLogic(conf,init) #Create GameStateBot game_state_bot = GameStateBot(conf,usenixlogic) game_state_bot.start() time.sleep(1) #Create ServiceBot servicebot = ServiceBot(conf,init) servicebot.start() #Create Scoreboard #Create UsenixExploitBot usenix_exploit_bot = UsenixExploitBot(conf,init) usenix_exploit_bot.start() #Create UsenixReportBot reportbot = UsenixReportBot(conf,8082) reportbot.start() reportbot.join() usenix_exploit_bot.join() servicebot.join() game_state_bot.join()
def main(argv): global flag_submission_bot if(len(argv) != 2): print "Usage: %s [all attack submission]" % argv[0] return #Load conf file config_path = "config/ructfe.ini" cip = ConfigIniParser() cip.addHandler(AttackConfigHandler(True)) conf = cip.load(config_path) print conf assert(conf.isValid()) #Create Game Type if(argv[1] == "all" or argv[1] == "attack"): attacklogic = AttackEngineLogic(conf) #Create GameStateBot game_state_bot = GameStateBot(conf,attacklogic) game_state_bot.start() time.sleep(1) #Create AttackBot attack_bot = AttackBot(conf,True) attack_bot.start() #Create WebBot web_bot = WebBot(conf,True) web_bot.start() print "All Started.." if(argv[1] == "all" or argv[1] == "submission"): #Create FlagSubmissionBot flag_submission_bot = FlagSubmissionBot(conf,True) print "Flag started" flag_submission_bot.start() flag_submission_bot.join() game_state_bot.join() attack_bot.join() web_bot.join()
def startPublic(init): cip = ConfigIniParser() cip.addHandler(ServiceBotConfigHandler()) cip.addHandler(ServiceConfigHandler()) cip.addHandler(UsenixConfigHandler()) config_path = "config/usenix_public.ini" conf = cip.load(config_path) conf.setFlagPhrase("flags wave in the wind") assert (conf.isValid()) #Create Game Logic usenixlogic = UsenixPublicLogic(conf, init) #Create GameStateBot game_state_bot = GameStateBot(conf, usenixlogic) game_state_bot.start() time.sleep(1) #Create ServiceBot servicebot = ServiceBot(conf, init) servicebot.start() #Create UsenixReportBot reportbot = UsenixReportBot(conf, 8081) reportbot.start() servicebot.join() reportbot.join() game_state_bot.join()
def startAll(init): #Setup config cip = ConfigIniParser() cip.addHandler(ServiceBotConfigHandler()) cip.addHandler(ServiceConfigHandler()) cip.addHandler(UsenixConfigHandler()) cip.addHandler(UsenixExploitConfigHandler()) #cip.addHandler(AttackConfigHandler(False)) #Load conf file config_path = "config/usenix.ini" conf = cip.load(config_path) #Temporary hack - this should be in config file.. conf.setFlagPhrase("flags wave in the wind") assert (conf.isValid()) #Create Game Logic usenixlogic = UsenixLogic(conf, init) #Create GameStateBot game_state_bot = GameStateBot(conf, usenixlogic) game_state_bot.start() time.sleep(1) #Create ServiceBot servicebot = ServiceBot(conf, init) servicebot.start() #Create Scoreboard #Create UsenixExploitBot usenix_exploit_bot = UsenixExploitBot(conf, init) usenix_exploit_bot.start() #Create UsenixReportBot reportbot = UsenixReportBot(conf, 8082) reportbot.start() reportbot.join() usenix_exploit_bot.join() servicebot.join() game_state_bot.join()
def main(argv): global flag_submission_bot if (len(argv) != 2): print "Usage: %s [all attack submission]" % argv[0] return #Load conf file config_path = "config/ructfe.ini" cip = ConfigIniParser() cip.addHandler(AttackConfigHandler(True)) conf = cip.load(config_path) print conf assert (conf.isValid()) #Create Game Type if (argv[1] == "all" or argv[1] == "attack"): attacklogic = AttackEngineLogic(conf) #Create GameStateBot game_state_bot = GameStateBot(conf, attacklogic) game_state_bot.start() time.sleep(1) #Create AttackBot attack_bot = AttackBot(conf, True) attack_bot.start() #Create WebBot web_bot = WebBot(conf, True) web_bot.start() print "All Started.." if (argv[1] == "all" or argv[1] == "submission"): #Create FlagSubmissionBot flag_submission_bot = FlagSubmissionBot(conf, True) print "Flag started" flag_submission_bot.start() flag_submission_bot.join() game_state_bot.join() attack_bot.join() web_bot.join()