DEFAULTS = { 'MENU': ({ 'name': _('x_exam'), 'parent': _('x_contest'), 'href': 'exam_list', }, ), 'WEB_MENU': ({ 'name': _('x_exam'), 'parent': _('x_contest'), 'href': 'list_new', 'icon': { 'value': 'oj-icon oj-icon-E905 font25P' } }, ), 'SLUG': 'event_exam', 'RELY_ON': [], 'EVENT_TYPE': Event.Type.EXAM, } IMPORT_STRINGS = () api_settings = APISettings('event_exam', None, DEFAULTS, IMPORT_STRINGS) init_database.register_init_function('event_exam', event_exam_init) from django.conf import settings if settings.PLATFORM_TYPE == "OJ": web_menus = api_settings.WEB_MENU web_menus[0]['parent'] = None
'value': 'oj-icon oj-icon-E91F font25P' }, 'WEB_OJ_SHOW': False, }, ), 'SLUG': 'practice_infiltration', 'RELY_ON': [], 'WEB_AD_SHOW': False, } IMPORT_STRINGS = () api_settings = APISettings('practice_infiltration', None, DEFAULTS, IMPORT_STRINGS) categorys = [ u"Web", u"Pwn", u"Reverse", u"Mobile", u"Crypto", u"Misc", u"Code", u"Other" ] practice_api.register(practice_api.PRACTICE_TYPE_INFILTRATION, categorys, api.InfiltrationPractice) init_database.register_init_function('practice_infiltration', practice_infiltration_init) from common_env.setting import api_settings as common_env_api_settings from . import get_using_env_tasks, get_env_target_task common_env_api_settings.GET_USING_ENV_OBJECTS_FUNCS.add(get_using_env_tasks) common_env_api_settings.GET_ENV_TARGET_FUNCS.add(get_env_target_task)
False, } IMPORT_STRINGS = () api_settings = APISettings('practice_theory', None, DEFAULTS, IMPORT_STRINGS) categorys = [ u'移动安全', u'网络基础知识', u'密码学基础', u'接入安全', u'主机安全', u'网络安全', u'办公安全', u'应用安全', u'数据库安全', u'云安全', u'安全服务', u'法律法规', u'安全防护', u'安全运维', u'安全工具', u'其他', ] practice_api.register(practice_api.PRACTICE_TYPE_THEORY, categorys, api.TheoryPractice) init_database.register_init_function('practice_theory', practice_theory_init)
'href': 'list' }, ), 'SLUG': 'course', 'NODE_PATH': '/usr/bin/node', 'RELY_ON': [], 'WEB_AD_SHOW': False, } IMPORT_STRINGS = () api_settings = APISettings('COURSE', None, DEFAULTS, IMPORT_STRINGS) from common_env.setting import api_settings as common_env_api_settings from . import get_using_env_lessons, get_ignored_using_env_count, get_env_target_lesson common_env_api_settings.GET_USING_ENV_OBJECTS_FUNCS.add(get_using_env_lessons) common_env_api_settings.GET_IGNORED_USING_ENV_COUNT_FUNCS.add( get_ignored_using_env_count) common_env_api_settings.GET_ENV_TARGET_FUNCS.add(get_env_target_lesson) init_database.register_init_function('course', course_init) from common_remote.setting import api_settings as common_remote_api_settings from .utils.recording.callback import callback as recording_callback common_remote_api_settings.RECORDING_CONVERT_CALLBACK.update( recording_callback)
'env_installers/foxit_FoxitReader_CHS_9.2.0.357911_sib.exe', 'platforms': [StandardDevice.SystemSubType.WINDOWS_7], 'install_script': '', }], }, { 'name': 'Foxmail', 'resources': [{ 'version': '7.2.9', 'file': 'env_installers/FoxmailSetup_7.2.9.1161_sib.exe', 'platforms': [StandardDevice.SystemSubType.WINDOWS_7], 'install_script': '', }], }], 'MAX_DOCKER_BLOCK_SECONDS': 20, 'DEFAULT_DOCKER_NETWORK': "default_docker_network", 'DOCKER_HOSTS': ['127.0.0.1'], } IMPORT_STRINGS = () api_settings = APISettings('common_env', None, DEFAULTS, IMPORT_STRINGS) init_database.register_init_function('common_env', common_env_init) from . import get_env_target_task api_settings.GET_ENV_TARGET_FUNCS.add(get_env_target_task)
}, { 'name': _('x_sys_notice'), 'parent': None, 'href': 'sys_notice_list', 'icon': { 'style': 'font awesonme', 'value': 'fa fa-commenting-o', } }), 'WEB_MENU': (), 'SLUG': 'system_configuration', 'RELY_ON': [], 'SSH_HOST_IP': '10.10.50.249', 'SSH_USERNAME': '******', 'LOG_ZIP_PASSWORD': '******', 'SHOW_NOTICE': False, } IMPORT_STRINGS = () api_settings = APISettings('system_configuration', None, DEFAULTS, IMPORT_STRINGS) init_database.register_init_function('system_configuration', system_configuration_init)
'SLUG': 'practice_real_vuln', 'RELY_ON': [], 'WEB_AD_SHOW': False, } IMPORT_STRINGS = () api_settings = APISettings('practice_real_vuln', None, DEFAULTS, IMPORT_STRINGS) categorys = [ u"web漏洞", u"移动端漏洞", u"硬件漏洞", u"操作系统漏洞", u"射频漏洞", u"工控漏洞", u"其他漏洞", ] practice_api.register(practice_api.PRACTICE_TYPE_REAL_VULN, categorys, api.RealVulnPractice) init_database.register_init_function('practice_real_vuln', practice_real_vuln_init) from common_env.setting import api_settings as common_env_api_settings from . import get_using_env_tasks, get_env_target_task common_env_api_settings.GET_USING_ENV_OBJECTS_FUNCS.add(get_using_env_tasks) common_env_api_settings.GET_ENV_TARGET_FUNCS.add(get_env_target_task)
# -*- coding: utf-8 -*- from __future__ import unicode_literals from common_calendar.api import calendar_init from common_framework.x_setting.settings import APISettings from system_configuration.utils import init_database DEFAULTS = { 'MENU': (), 'WEB_MENU': (), 'SLUG': 'calendar', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('calendar', None, DEFAULTS, IMPORT_STRINGS) init_database.register_init_function('calendar', calendar_init)
'MENU': ({ 'name': _('x_ad_mode'), 'parent': _('x_practice_library'), 'href': 'task_list', 'CMS_OJ_SHOW': False, }, ), 'WEB_MENU': (), 'SLUG': 'practice_attack_defense', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('practice_attack_defense', None, DEFAULTS, IMPORT_STRINGS) categorys = [ u"Web", u"Pwn", ] practice_api.register(practice_api.PRACTICE_TYPE_ATTACK_DEFENSE, categorys, api.AttackDefensePractice) init_database.register_init_function('practice_attack_defense', practice_attack_defense_init) from common_env.setting import api_settings as common_env_api_settings from . import get_env_target_task common_env_api_settings.GET_ENV_TARGET_FUNCS.add(get_env_target_task)
# 'href': 'team', # 'icon': {'value': 'oj-icon oj-icon-E90A font25P'}, # 'WEB_OJ_SHOW': False, # }, # { # 'name': gettext('我的收藏'), # 'parent': '个人中心', # 'href': 'collect', # 'icon': {'value': 'oj-icon oj-icon-E90B font25P'} # }, { 'name': _('x_scoreboard'), 'parent': _('x_practice'), 'href': 'rank', 'icon': { 'value': 'oj-icon oj-icon-E928 font25P' }, 'WEB_AD_SHOW': False, }, ), 'SLUG': 'x_person', 'RELY_ON': [], 'LOGO_WHITE_LIST': ('gif', 'jpeg', 'jpg', 'bmp', 'png'), } IMPORT_STRINGS = () api_settings = APISettings('x_person', None, DEFAULTS, IMPORT_STRINGS) init_database.register_init_function('x_person', x_person_init)
'value': 'fa fa-leaf', }, }, { 'name': _('x_event_manage'), 'parent': _('x_practice_library'), 'href': 'event_list', }, ), 'WEB_MENU': ({ 'name': _('x_practice'), 'parent': None, }, ), 'SLUG': 'practice', 'RELY_ON': [], 'WEB_AD_SHOW': False, } IMPORT_STRINGS = () api_settings = APISettings('practice', None, DEFAULTS, IMPORT_STRINGS) init_database.register_init_function('practice', practice_init) from common_env.setting import api_settings as common_env_api_settings from . import get_ignored_using_env_count common_env_api_settings.GET_IGNORED_USING_ENV_COUNT_FUNCS.add( get_ignored_using_env_count)
# 'href': 'task_list', # }, ), 'WEB_MENU': ( # { # 'name': _('x_man_machine'), # 'parent': _('x_practice'), # 'href': 'list', # 'icon': {'value': 'oj-icon oj-icon-E903 font25P'} # }, ), 'SLUG': 'practice_man_machine', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('practice_man_machine', None, DEFAULTS, IMPORT_STRINGS) categorys = [u"web攻防", u"二进制攻防", u"其他"] # practice_api.register(practice_api.PRACTICE_TYPE_MAN_MACHINE, categorys, api.ManMachinePractice) init_database.register_init_function('practice_man_machine', practice_man_machine_init) from common_env.setting import api_settings as common_env_api_settings from . import get_using_env_tasks, get_env_target_task common_env_api_settings.GET_USING_ENV_OBJECTS_FUNCS.add(get_using_env_tasks) common_env_api_settings.GET_ENV_TARGET_FUNCS.add(get_env_target_task)