当前位置: 首页>>代码示例>>Python>>正文


Python datatype.AttribDict方法代码示例

本文整理汇总了Python中lib.core.datatype.AttribDict方法的典型用法代码示例。如果您正苦于以下问题:Python datatype.AttribDict方法的具体用法?Python datatype.AttribDict怎么用?Python datatype.AttribDict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lib.core.datatype的用法示例。


在下文中一共展示了datatype.AttribDict方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: initialize_options

# 需要导入模块: from lib.core import datatype [as 别名]
# 或者: from lib.core.datatype import AttribDict [as 别名]
def initialize_options(self, taskid):
        datatype = {"boolean": False, "string": None, "integer": None, "float": None}
        self.options = AttribDict()

        for _ in optDict:
            for name, type_ in optDict[_].items():
                type_ = unArrayizeValue(type_)
                self.options[name] = _defaults.get(name, datatype[type_])

        # Let sqlmap engine knows it is getting called by the API,
        # the task ID and the file path of the IPC database
        self.options.api = True
        self.options.taskid = taskid
        self.options.database = Database.filepath

        # Enforce batch mode and disable coloring and ETA
        self.options.batch = True
        self.options.disableColoring = True
        self.options.eta = False

        self._original_options = AttribDict(self.options) 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:23,代码来源:api.py

示例2: reset_options

# 需要导入模块: from lib.core import datatype [as 别名]
# 或者: from lib.core.datatype import AttribDict [as 别名]
def reset_options(self):
        self.options = AttribDict(self._original_options) 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:4,代码来源:api.py

示例3: parseXmlNode

# 需要导入模块: from lib.core import datatype [as 别名]
# 或者: from lib.core.datatype import AttribDict [as 别名]
def parseXmlNode(node):
    for element in node.getiterator('boundary'):
        boundary = AttribDict()

        for child in element.getchildren():
            if child.text:
                values = cleanupVals(child.text, child.tag)
                boundary[child.tag] = values
            else:
                boundary[child.tag] = None

        conf.boundaries.append(boundary)

    for element in node.getiterator('test'):
        test = AttribDict()

        for child in element.getchildren():
            if child.text and child.text.strip():
                values = cleanupVals(child.text, child.tag)
                test[child.tag] = values
            else:
                if len(child.getchildren()) == 0:
                    test[child.tag] = None
                    continue
                else:
                    test[child.tag] = AttribDict()

                for gchild in child.getchildren():
                    if gchild.tag in test[child.tag]:
                        prevtext = test[child.tag][gchild.tag]
                        test[child.tag][gchild.tag] = [prevtext, gchild.text]
                    else:
                        test[child.tag][gchild.tag] = gchild.text

        conf.tests.append(test) 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:37,代码来源:payloads.py

示例4: _setPrefixSuffix

# 需要导入模块: from lib.core import datatype [as 别名]
# 或者: from lib.core.datatype import AttribDict [as 别名]
def _setPrefixSuffix():
    if conf.prefix is not None and conf.suffix is not None:
        # Create a custom boundary object for user's supplied prefix
        # and suffix
        boundary = AttribDict()

        boundary.level = 1
        boundary.clause = [0]
        boundary.where = [1, 2, 3]
        boundary.prefix = conf.prefix
        boundary.suffix = conf.suffix

        if " like" in boundary.suffix.lower():
            if "'" in boundary.suffix.lower():
                boundary.ptype = 3
            elif '"' in boundary.suffix.lower():
                boundary.ptype = 5
        elif "'" in boundary.suffix:
            boundary.ptype = 2
        elif '"' in boundary.suffix:
            boundary.ptype = 4
        else:
            boundary.ptype = 1

        # user who provides --prefix/--suffix does not want other boundaries
        # to be tested for
        conf.boundaries = [boundary] 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:29,代码来源:option.py

示例5: initOptions

# 需要导入模块: from lib.core import datatype [as 别名]
# 或者: from lib.core.datatype import AttribDict [as 别名]
def initOptions(inputOptions=AttribDict(), overrideOptions=False):
    if IS_WIN:
        coloramainit()

    _setConfAttributes()
    _setKnowledgeBaseAttributes()
    _mergeOptions(inputOptions, overrideOptions) 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:9,代码来源:option.py

示例6: parseXmlNode

# 需要导入模块: from lib.core import datatype [as 别名]
# 或者: from lib.core.datatype import AttribDict [as 别名]
def parseXmlNode(node):
    for element in node.getiterator("boundary"):
        boundary = AttribDict()

        for child in element.getchildren():
            if child.text:
                values = cleanupVals(child.text, child.tag)
                boundary[child.tag] = values
            else:
                boundary[child.tag] = None

        conf.boundaries.append(boundary)

    for element in node.getiterator("test"):
        test = AttribDict()

        for child in element.getchildren():
            if child.text and child.text.strip():
                values = cleanupVals(child.text, child.tag)
                test[child.tag] = values
            else:
                if len(child.getchildren()) == 0:
                    test[child.tag] = None
                    continue
                else:
                    test[child.tag] = AttribDict()

                for gchild in child.getchildren():
                    if gchild.tag in test[child.tag]:
                        prevtext = test[child.tag][gchild.tag]
                        test[child.tag][gchild.tag] = [prevtext, gchild.text]
                    else:
                        test[child.tag][gchild.tag] = gchild.text

        conf.tests.append(test) 
开发者ID:sabri-zaki,项目名称:EasY_HaCk,代码行数:37,代码来源:payloads.py

示例7: initOptions

# 需要导入模块: from lib.core import datatype [as 别名]
# 或者: from lib.core.datatype import AttribDict [as 别名]
def initOptions(inputOptions=AttribDict(), overrideOptions=False):
    _setConfAttributes()
    _setKnowledgeBaseAttributes()
    _mergeOptions(inputOptions, overrideOptions) 
开发者ID:sabri-zaki,项目名称:EasY_HaCk,代码行数:6,代码来源:option.py


注:本文中的lib.core.datatype.AttribDict方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。