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