Esempio n. 1
0
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()
Esempio n. 2
0
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()
Esempio n. 3
0
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()
Esempio n. 4
0
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()
Esempio n. 5
0
 def testOneScript(self):
     bot = ServiceBot()