コード例 #1
0
ファイル: Usenix.py プロジェクト: RootFu/ctf-scorebot
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()
コード例 #2
0
ファイル: Usenix.py プロジェクト: fabio-d/ctf-scorebot
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()
コード例 #3
0
ファイル: Usenix.py プロジェクト: RootFu/ctf-scorebot
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()
コード例 #4
0
ファイル: Usenix.py プロジェクト: fabio-d/ctf-scorebot
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()