示例#1
0
文件: flags.py 项目: hitgo00/i_sploit
 def get(self, type_name):
     if type_name:
         flag_class = get_flag_class(type_name)
         response = {"name": flag_class.name, "templates": flag_class.templates}
         return {"success": True, "data": response}
     else:
         response = {}
         for class_id in FLAG_CLASSES:
             flag_class = FLAG_CLASSES.get(class_id)
             response[class_id] = {
                 "name": flag_class.name,
                 "templates": flag_class.templates,
             }
         return {"success": True, "data": response}
示例#2
0
 def get(self, type_name):
     if type_name:
         flag_class = get_flag_class(type_name)
         response = {
             'name': flag_class.name,
             'templates': flag_class.templates
         }
         return {'success': True, 'data': response}
     else:
         response = {}
         for class_id in FLAG_CLASSES:
             flag_class = FLAG_CLASSES.get(class_id)
             response[class_id] = {
                 'name': flag_class.name,
                 'templates': flag_class.templates,
             }
         return {'success': True, 'data': response}