當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。