Python burp.IMessageEditorTab() Examples
The following are 9
code examples of burp.IMessageEditorTab().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
burp
, or try the search function
.
Example #1
Source File: AlteredCustomEditorTab.py From burp-exceptions with Apache License 2.0 | 6 votes |
def createNewInstance(self, controller, editable): # create a new instance of our custom editor tab return Base64InputTab(self, controller, editable) # # class implementing IMessageEditorTab #
Example #2
Source File: AlteredCustomEditorTab.py From burp-exceptions with Apache License 2.0 | 6 votes |
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 #
Example #3
Source File: editor.py From inql with Apache License 2.0 | 6 votes |
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
Example #4
Source File: editor.py From inql with Apache License 2.0 | 6 votes |
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
Example #5
Source File: protobuf_decoder.py From protobuf-decoder with GNU General Public License v2.0 | 5 votes |
def createNewInstance(self, controller, editable): # create a new instance of our custom editor tab return ProtobufHelperTab(self, controller, editable) # # class implementing IMessageEditorTab #
Example #6
Source File: editor.py From inql with Apache License 2.0 | 5 votes |
def getUiComponent(self): """ Get UI Component. Overrides IMessageEditorTab. :return: UI txt component """ return self.payload_view.this
Example #7
Source File: editor.py From inql with Apache License 2.0 | 5 votes |
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())
Example #8
Source File: CaidaoExt.py From Caidao-AES-Version with MIT License | 5 votes |
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 #
Example #9
Source File: CaidaoExt.py From Caidao-AES-Version with MIT License | 5 votes |
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 #