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


Python burp.IMessageEditorTab方法代码示例

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


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

示例1: isEnabled

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def isEnabled(self, content, isRequest):
        """
        Check if we can enable or not the MessageEditorTab. Overrides IMessageEditorTab.

        :param content: message request/response
        :param isRequest: check if is request
        :return: True or False depending if the request is enabled to be edited with this tab.
        """
        if isRequest:
            rBody = self._helpers.analyzeRequest(content)

        else:
            rBody = self._helpers.analyzeResponse(content)

        message = content[rBody.getBodyOffset():].tostring().strip()
        try:
            content = json.loads(str(message))
            if isinstance(content, list):
                content = content[0]

            return 'query' in content and \
                   any([content['query'].strip().startswith(qtype) for qtype in ['query', 'mutation', 'subscription', '{']])
        except ValueError:
            return False 
开发者ID:doyensec,项目名称:inql,代码行数:26,代码来源:editor.py

示例2: setMessage

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def setMessage(self, content, isRequest):
        """
        Message Setter. Overrides IMessageEditorTab.

        :param content: message request/response
        :param isRequest: check if is request
        :return: the modified body
        """
        if content is not None:
            r = self._helpers.analyzeRequest(content)
            self._currentMessage = content
            message = content[r.getBodyOffset():].tostring()

            try:
                self.payload_view.refresh(message)
            except ValueError:
                pass 
开发者ID:doyensec,项目名称:inql,代码行数:19,代码来源:editor.py

示例3: getMessage

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def getMessage(self):
        """
        Message Getter. Overrides IMessageEditorTab.

        :return: the current message
        """
        if self.isModified():
            try:
                request_body = self.payload_view.textarea().getText()
                r = self._helpers.analyzeRequest(self._currentMessage)
                return self._helpers.buildHttpMessage(r.getHeaders(), request_body)
            except Exception as ex:
                print(ex)
                return self._helpers.buildHttpMessage(r.getHeaders(), self._currentMessage[r.getBodyOffset():].tostring()) 
开发者ID:doyensec,项目名称:inql,代码行数:16,代码来源:editor.py

示例4: createNewInstance

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def createNewInstance(self, controller, editable):
        
        # create a new instance of our custom editor tab
        return Base64InputTab(self, controller, editable)
        
# 
# class implementing IMessageEditorTab
# 
开发者ID:securityMB,项目名称:burp-exceptions,代码行数:10,代码来源:AlteredCustomEditorTab.py

示例5: __init__

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def __init__(self, extender, controller, editable):
        self._extender = extender
        self._editable = editable
        
        # create an instance of Burp's text editor, to display our deserialized data
        self._txtInput = extender._callbacks.createTextEditor()
        self._txtInput.setEditable(editable)
        return
        
    #
    # implement IMessageEditorTab
    # 
开发者ID:securityMB,项目名称:burp-exceptions,代码行数:14,代码来源:AlteredCustomEditorTab.py

示例6: createNewInstance

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def createNewInstance(self, controller, editable):
        
        # create a new instance of our custom editor tab
        return ProtobufHelperTab(self, controller, editable)
        

# 
# class implementing IMessageEditorTab
# 
开发者ID:nevermoe,项目名称:protobuf-decoder,代码行数:11,代码来源:protobuf_decoder.py

示例7: getUiComponent

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def getUiComponent(self):
        """
        Get UI Component. Overrides IMessageEditorTab.

        :return: UI txt component
        """
        return self.payload_view.this 
开发者ID:doyensec,项目名称:inql,代码行数:9,代码来源:editor.py

示例8: processHttpMessage

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def processHttpMessage(self, toolFlag, messageIsRequest, messageInfo):
        key = "0123456789012345"
        iv = "9876543210987654"
        
        # only process requests
        if messageIsRequest:
            
            info = getInfo(messageInfo, messageIsRequest, self._helpers)
            headers = info.getHeaders()
        
            # get the body
            body = getBody(messageInfo.getRequest(), messageIsRequest, self._helpers)
            
            # encrypt the caidao post body
            encryptedBody = encryptJython(body, key, iv)
        
            newMSG = self._helpers.buildHttpMessage(headers, encryptedBody)
            messageInfo.setRequest(newMSG)
        else:
        
            info = getInfo(messageInfo.getResponse(), messageIsRequest, self._helpers)
            headers = info.getHeaders()
        
            # get the body
            body = getBody(messageInfo.getResponse(), messageIsRequest, self._helpers)
            
            # decrypt the aes body
            decryptedBody = decryptJython(body, key, iv)
        
            newMSG = self._helpers.buildHttpMessage(headers, decryptedBody)
            messageInfo.setResponse(newMSG)
            
# 
# class implementing IMessageEditorTab
# 
开发者ID:ekgg,项目名称:Caidao-AES-Version,代码行数:37,代码来源:CaidaoExt.py

示例9: __init__

# 需要导入模块: import burp [as 别名]
# 或者: from burp import IMessageEditorTab [as 别名]
def __init__(self, extender, controller, editable):
        self._extender = extender
        self._editable = editable
        # Parsia: Burp helpers object
        self.helpers = extender._helpers

        # create an instance of Burp's text editor, to display our decrypted data
        self._txtInput = extender._callbacks.createTextEditor()
        self._txtInput.setEditable(editable)
        
    #
    # implement IMessageEditorTab
    # 
开发者ID:ekgg,项目名称:Caidao-AES-Version,代码行数:15,代码来源:CaidaoExt.py


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