public ReplayDetailsPanel() { super(); messageEditorRequest = callbacks.createMessageEditor(messageEditorController, false); messageEditorResponse = callbacks.createMessageEditor(messageEditorController, false); JPanel panelRequest = new JPanel(); JPanel panelResponse = new JPanel(); JSplitPane detailsSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, panelRequest, panelResponse); detailsSplitPane.setResizeWeight(0.5); panelRequest.setLayout(new BorderLayout()); panelResponse.setLayout(new BorderLayout()); panelRequest.add(messageEditorRequest.getComponent()); panelResponse.add(messageEditorResponse.getComponent()); this.setLayout(new BorderLayout()); this.add(detailsSplitPane, BorderLayout.CENTER); }
private void displayConfiguration(ContentSecurityPolicy policy) { IMessageEditor msg = callbacks.createMessageEditor(null, true); StringBuilder str = new StringBuilder(); str.append("Content-Security-Policy: "); str.append(policy.toHeaderString()); str.append("\n\n"); msg.setMessage(str.toString().getBytes(), false); panel.setConfiguration(msg.getComponent()); }
public RequestResponsePanel(IBurpExtenderCallbacks callbacks) { this.editorRequest = callbacks.createMessageEditor(null, false); this.editorResponse = callbacks.createMessageEditor(null, false); addTab("Request", editorRequest.getComponent()); addTab("Response", editorResponse.getComponent()); }
bottomSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, requestEditor.getComponent(), responseEditor.getComponent()); bottomSplit.setResizeWeight(0.5);
void setViewType(byte viewType) { requestEditor = BurpExtender.callbacks.createMessageEditor(messageEditorController, viewType == BurpExtender.TESTER_VIEW); bottomSplit.setLeftComponent(requestEditor.getComponent()); if(optionsPanel.currentIssue != null) { requestEditor.setMessage(optionsPanel.currentIssue.request == null ? OptionsPanel.EMPTY_MESSAGE : optionsPanel.currentIssue.request, true); } this.viewType = viewType; optionsPanel.setViewType(viewType); issueTableModel.setViewType(viewType); } }
PopupRequestResponseDialog(IHttpRequestResponse requestResponse, IBurpExtenderCallbacks callbacks, Container parent, String title) { this.requestResponse = requestResponse; Frame parentFrame = JOptionPane.getFrameForComponent(parent); JDialog dialog = new JDialog(parentFrame, title); requestEditor = callbacks.createMessageEditor(this, false); requestEditor.setMessage(requestResponse.getRequest(), true); responseEditor = callbacks.createMessageEditor(this, false); responseEditor.setMessage(requestResponse.getResponse(), false); JTabbedPane tabs = new JTabbedPane(); tabs.add("Request", requestEditor.getComponent()); tabs.add("Response", responseEditor.getComponent()); dialog.getContentPane().add(tabs); dialog.setSize(Math.min(800,parentFrame.getWidth()/2),Math.min(600, parentFrame.getHeight()/2)); //dialog.setLocationRelativeTo(parentFrame); dialog.setLocation(parentFrame.getWidth()/2 - dialog.getWidth()/2 + parentFrame.getX(), parentFrame.getHeight()/2 - dialog.getHeight()/2 + parentFrame.getY()); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); }
requestViewer = callbacks.createMessageEditor(this, false); responseViewer = callbacks.createMessageEditor(this, false); tab.addTab("Request", requestViewer.getComponent()); tab.addTab("Response", responseViewer.getComponent());
originalRequestPanel.add(originalRequestViewer.getComponent()); originalRequestPanel.setPreferredSize(new Dimension(100000, 100000)); originalResponsePanel.add(originalResponseViewer.getComponent()); originalResponsePanel.setPreferredSize(new Dimension(100000, 100000)); modifiedRequestPanel.add(modifiedRequestViewer.getComponent()); modifiedRequestPanel.setPreferredSize(new Dimension(100000, 100000)); modifiedResponsePanel.add(modifiedResponseViewer.getComponent()); modifiedResponsePanel.setPreferredSize(new Dimension(100000, 100000));