@Override public Component getUiComponent() { return txtInput.getComponent(); }
/** * * @return Data selected by the user. */ @Override public byte[] getSelectedData() { return burpEditor.getSelectedText(); }
/** * Set if the text area should allow modifications. * @param editable True, the text area is editable, false, the text * area is not editable. */ @Override public void setEditable(boolean editable) { burpEditor.setEditable(editable); }
@Override public void setMessage(byte[] content, boolean isRequest) { if (content == null) { editor.setText(null); currentMessage = null; } else { int bodyOffset = callbacks.getHelpers().analyzeResponse(content).getBodyOffset(); byte[] bodyContent = Arrays.copyOfRange(content, bodyOffset, content.length); currentMessage = content; editor.setText(beautifyJS(bodyContent)); } editor.setEditable(false); }
/** * Set the text of the text area. * @param text The text to set. */ @Override public void setText(byte[] text) { burpEditor.setText(text); }
public InputTab(IMessageEditorController controller, boolean editable) { this.editable = editable; guiContainer = new JTabbedPane(); // create an instance of Burp's text editor, to display our deserialized data burpEditor = callbacks.createTextEditor(); burpEditor.setEditable(editable); // create a source code viewer sourceViewer = new UISourceViewer(callbacks); guiContainer.addTab("JSON Viewer", sourceViewer); guiContainer.addTab("Raw", burpEditor.getComponent()); }
/** * Indicator for the proxy to show the original and edited tab. * @return True if message is modified by the user. */ @Override public boolean isModified() { return burpEditor.isTextModified(); }
/** * Set the serach or regular expression * @param expression The search or regular expression. */ @Override public void setSearchExpression(String expression) { burpEditor.setSearchExpression(expression); }
/** * Get the start and end of the selected text. * @return Start and end of the selected text. */ @Override public int[] getSelectionBounds() { return burpEditor.getSelectionBounds(); }
/** * Get the text of the text area. * @return The text of the text area. */ @Override public byte[] getText() { return burpEditor.getText(); }
if (content == null) { burpEditor.setText(null); burpEditor.setEditable(false); sourceViewer.setText(null, null); guiContainer.setEnabled(false); burpEditor.setText(json.getBytes()); try{ sourceViewer.setText(new JSONObject(json).toString(2), SyntaxConstants.SYNTAX_STYLE_JSON); burpEditor.setText(helpers.stringToBytes(input)); burpEditor.setEditable(editable);
public void setText(byte[] text) { this.textEditor.setText(text); }
public InputTab(IMessageEditorController controller, boolean editable) { this.editable = editable; editor = new JTabbedPane(); // create an instance of Burp's text editor, to display our deserialized data txtInput = callbacks.createTextEditor(); txtInput.setEditable(editable); // create a source code viewer sourceViewerHeader = new UISourceViewer(callbacks); sourceViewerPayload = new UISourceViewer(callbacks); sourceViewerSignature = new UISourceViewer(callbacks); editor.addTab("Header", sourceViewerHeader); editor.addTab("Payload", sourceViewerPayload); editor.addTab("Base64(Signature)", sourceViewerSignature); editor.addTab("Raw", txtInput.getComponent()); }
/** * Indicator for the proxy to show the original and edited tab. * @return True if message is modified by the user. */ @Override public boolean isModified() { return txtInput.isTextModified(); }
public void setSearchExpression(String expression) { this.textEditor.setSearchExpression(expression); }
public int[] getSelectionBounds() { return(this.textEditor.getSelectionBounds()); }
public byte[] getText() { return(this.textEditor.getText()); }
if (content == null) { txtInput.setText(null); txtInput.setEditable(false); sourceViewerHeader.setText(null, null); sourceViewerPayload.setText(null, null); txtInput.setText(jwt.getBytes()); txtInput.setText(helpers.stringToBytes(jwt)); txtInput.setEditable(editable); try{ sourceViewerHeader.setText(new org.json.JSONObject(jwt_list[0]).toString(2), SyntaxConstants.SYNTAX_STYLE_JSON);
@Override public byte[] getSelectedData() { return txtInput.getSelectedText(); }