'name': _('x_course'), 'parent': None, '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(
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import gettext from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': (), 'WEB_MENU': (), 'SLUG': 'message', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('message', None, DEFAULTS, IMPORT_STRINGS)
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import gettext from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': (), 'WEB_MENU': (), 'SLUG': 'auth', 'RELY_ON': [], 'OFFLINE_TIME': 300, } IMPORT_STRINGS = () api_settings = APISettings('AUTH', None, DEFAULTS, IMPORT_STRINGS)
'parent': _('x_practice'), 'href': 'list', 'icon': { 'value': 'oj-icon oj-icon-E901 font25P' } }, ), '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)
'parent': _('x_practice'), 'href': 'list', 'icon': { 'value': 'oj-icon oj-icon-E916 font25P' } }, ), 'SLUG': 'practice_theory', 'RELY_ON': [], 'WEB_AD_SHOW': 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'安全防护',
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import gettext_lazy as _ from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': ({ 'name': _('x_cloud_exchange'), 'parent': None, 'href': 'comments', 'icon': { 'style': 'font awesonme', 'value': 'fa fa-comments', }, }, ), 'WEB_MENU': (), 'SLUG': 'x_comment', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('x_comment', None, DEFAULTS, IMPORT_STRINGS)
DEFAULTS = { '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': 'list', 'icon': { '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)
'parent': _('x_cloud_management'), 'href': 'department', 'CMS_AD_SHOW': False, 'CMS_OJ_SHOW': False, 'CMS_ALL_SHOW': False, }, { 'name': _('x_version_management'), 'parent': _('x_cloud_management'), 'href': 'update', 'CMS_AD_SHOW': False, 'CMS_OJ_SHOW': False, 'CMS_ALL_SHOW': False, }, ), 'WEB_MENU': (), 'SLUG': 'common_cloud', 'RELY_ON': [], 'USE_SAME_KEY': True, 'CLOUD_CENTER': "127.0.0.1:8000", 'TENANT': '' } IMPORT_STRINGS = () api_settings = APISettings('COMMON_CLOUD', None, DEFAULTS, IMPORT_STRINGS)
# '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)
from django.utils.translation import ugettext_lazy as _ from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': ({ 'name': _('x_toolbox'), 'parent': None, 'href': 'tools', 'icon': { 'style': 'font awesonme', 'value': 'fa fa-briefcase', }, }, ), 'WEB_MENU': ({ 'name': _('x_toolbox'), 'parent': None, 'href': 'list', 'icon': { 'value': 'oj-icon oj-icon-E90D font25P' } }, ), 'SLUG': 'x_tools', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('x_tools', None, DEFAULTS, IMPORT_STRINGS)
# '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)
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import gettext from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': ( # { # 'name': gettext('用户笔记'), # 'parent': None, # 'href': 'notes', # 'icon': { # 'style': 'font awesonme', # 'value': 'fa fa-file-text', # }, # }, ), 'WEB_MENU': (), 'SLUG': 'x_note', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('x_note', None, DEFAULTS, IMPORT_STRINGS)
'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)
import os from django.conf import settings from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': ( ), 'WEB_MENU': ( ), 'SLUG': 'common_resource', 'RELY_ON': [ ], 'DUMP_TMP_DIR': os.path.join(settings.BASE_DIR, 'common_resource', 'resources/dump_tmp'), 'LOAD_TMP_DIR': os.path.join(settings.BASE_DIR, 'common_resource', 'resources/load_tmp'), 'COURSE_README': os.path.join(settings.BASE_DIR, 'common_resource', 'resources/readme/course_readme.md'), 'PRACTICE_README': os.path.join(settings.BASE_DIR, 'common_resource', 'resources/readme/practice_readme.md'), 'VIDEO_TRANS': os.path.join(settings.MEDIA_ROOT, 'course', 'video_trans/video_change'), 'ZIP_PWD': '2386f2849c35b4f5a8f269b3b422bb38', 'DEFAULT_USER_ID': 1, } IMPORT_STRINGS = () api_settings = APISettings('common_resource', None, DEFAULTS, IMPORT_STRINGS)
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': ( { 'name': _('x_upgrade_management'), 'parent': _('x_system_management'), 'href': 'update', }, ), 'WEB_MENU': ( ), 'SLUG': 'cloud_client', 'RELY_ON': [ ], 'update_zip':'23pZvWBBmlgRNDShLTWEieDsLjnHU6c0', 'version_host':'version.cyberpeace.cn', } IMPORT_STRINGS = () api_settings = APISettings('CLOUD_CLIENT', None, DEFAULTS, IMPORT_STRINGS)
# -*- 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)
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': ({ 'name': _('x_occupational_system'), 'parent': _('x_course'), 'href': 'occupation_list', 'CMS_AD_SHOW': False, }, ), 'WEB_MENU': ( # { # 'name': _('x_course'), # 'parent': None, # 'href': 'list' # }, ), 'SLUG': 'course_occupation', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('course_occupation', None, DEFAULTS, IMPORT_STRINGS) # init_database.register_init_function('course_occupation', system_configuration_init)
}, { '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)
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
'name': _('x_self_test_paper_library'), 'parent': _('x_contest'), 'href': 'list', 'icon': { 'style': 'font awesonme', 'value': 'fa fa-newspaper-o', }, }, ), 'WEB_MENU': ( { 'name': _('x_self_test_paper'), 'parent': _('x_practice'), 'href': 'exam', 'icon': {'value': 'oj-icon oj-icon-E91F font25P'} }, ), 'SLUG': 'practice_capability', 'RELY_ON': [], 'WEB_AD_SHOW': False, } IMPORT_STRINGS = () api_settings = APISettings('practice_capability', None, DEFAULTS, IMPORT_STRINGS) categorys = [ ] practice_api.register(practice_api.PRACTICE_TYPE_THEORY, categorys, api.TheoryPractice)
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': ({ 'name': _('x_experiment'), 'parent': _('x_practice_library'), 'href': 'experiments', }, ), 'WEB_MENU': ({ 'name': _('x_experiment'), 'parent': _('x_practice'), 'href': 'list', 'icon': { 'value': 'oj-icon oj-icon-E923 font25P' } }, ), 'SLUG': 'experiment', 'RELY_ON': [], } IMPORT_STRINGS = () api_settings = APISettings('experiment', None, DEFAULTS, IMPORT_STRINGS)
from django.utils.translation import ugettext_lazy as _ from common_framework.x_setting.settings import APISettings DEFAULTS = { 'MENU': ({ 'name': _('x_dashboard'), 'parent': None, 'icon': { 'style': 'font awesonme', 'value': 'fa fa-dashboard', }, 'href': 'dashboard', }, ), 'WEB_MENU': (), 'SLUG': 'dashboard', 'RELY_ON': [], # cpu ram disk 告警比例配置 'ALARM_PERCENT': { 'cpu_alarm_percent': 80, 'ram_alarm_percent': 80, 'disk_alarm_percent': 80, } } IMPORT_STRINGS = () api_settings = APISettings('dashboard', None, DEFAULTS, IMPORT_STRINGS)