@Override public List<IScanIssue> doPassiveScan(IHttpRequestResponse baseRequestResponse) { List<IScanIssue> issues = super.doPassiveScan(baseRequestResponse); URL url = helpers.analyzeRequest(baseRequestResponse).getUrl(); /* * Here we check possible vulnerabilities related on request path */ if ((tabComponent.getCbxPathScanInScope().isSelected() && !callbacks.isInScope(url)) || !tabComponent.getCbxPathSearch().isSelected()) { return issues; } String domainName = url.getHost(); String path = url.getPath(); Domain domain = domains.get(domainName); if (domain == null) { domains.put(domainName, domain = new Domain()); } if (!domain.getPaths().containsKey(path)) { callbacks.printOutput("[Vulners] adding new path '" + path + "' for domain " + domainName); domain.getPaths().put(path, null); vulnersService.checkURLPath(domainName, path, baseRequestResponse); } return issues; }
callbacks.printOutput("[Vulners] Processing issues for: " + domainName);
private void onTableChage(TableModelEvent e) { int row = e.getFirstRow(); int column = e.getColumn(); MatchRule rule = scan.getMatchRule(row); if (rule == null) { rule = new MatchRule(Pattern.compile("."), 1, "", ScanIssueSeverity.LOW, ScanIssueConfidence.CERTAIN); scan.addMatchRule(rule); } switch (column) { case 0: mCallbacks.printOutput("new pattern: " + (String)model.getValueAt(row, column)); rule.setPattern(Pattern.compile((String)model.getValueAt(row, column))); break; case 1: rule.setMatchGroup((Integer)model.getValueAt(row, column)); break; case 2: rule.setType((String)model.getValueAt(row, column)); break; case 3: rule.setSeverity(ScanIssueSeverity.fromName((String)model.getValueAt(row, column))); break; case 4: rule.setConfidence(ScanIssueConfidence.fromName((String)model.getValueAt(row, column))); break; } }
private void log(String message) { callbacks.issueAlert(message); callbacks.printOutput(message); } }
private void log(String message) { callbacks.issueAlert(message); callbacks.printOutput(message); }
.queryString("type", software.getMatchType()); callbacks.printOutput("[Vulners] start check for domain " + domainName + " for software " + software.getName() + "/" + software.getVersion() + " : " + request.getUrl());
@Override public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) { this.callbacks = callbacks; callbacks.printOutput(ExtenderName); callbacks.printOutput(github); helpers = callbacks.getHelpers(); callbacks.setExtensionName(ExtenderName); callbacks.registerMessageEditorTabFactory(this); }
@Override public void stateChanged(ChangeEvent e) { if (autoCheck != chkAutoCheck.isSelected()) { autoCheck = chkAutoCheck.isSelected(); AboutTab.this.callbacks.saveExtensionSetting(SETTING_UPDATE_CHECK_AUTO, "" + autoCheck); AboutTab.this.callbacks.printOutput("CO2 automatic version check is now " + (autoCheck ? "on" : "off")); if (autoCheck) { versionCheck(true); } } } });
public static void initializeFromSave(String configuration, boolean replaceTabs) { getCallbacks().printOutput("Loading Stored AutoRepeater Configuration"); String configurationJson; // Check if the configuration is B64 encoded for legacy. try { configurationJson = new String(Base64.getDecoder().decode(configuration)); } catch (IllegalArgumentException e) { configurationJson = configuration; } JsonParser jsonParser = new JsonParser(); JsonArray tabConfigurations = jsonParser.parse(configurationJson).getAsJsonArray(); if (replaceTabs) { closeAllTabs(); } for (JsonElement tabConfiguration : tabConfigurations) { addNewTab(tabConfiguration.getAsJsonObject()); } }
public static void closeAllTabs() { tabChangeListenerLock = true; int tabCount = mainTabbedPane.getTabCount() - 1; for (int i = 0; i < tabCount; i++) { if (mainTabbedPane.getTabComponentAt(0).getClass().equals(AutoRepeaterTabHandle.class)) { try { AutoRepeaterTabHandle arth = (AutoRepeaterTabHandle) mainTabbedPane.getTabComponentAt(0); autoRepeaters.remove(arth.autoRepeater); mainTabbedPane.remove(0); } catch (Exception e) { getCallbacks().printOutput(e.getMessage()); } } } tabChangeListenerLock = false; }
@Override public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) { Tab tab = new Tab(callbacks); ContextMenuFactory contextMenuFactory = new ContextMenuFactory(callbacks, tab); callbacks.setExtensionName(EXTENSION); callbacks.addSuiteTab(tab); callbacks.customizeUiComponent(tab.getUiComponent()); callbacks.printOutput(String.format("%s tab initialised", EXTENSION)); callbacks.registerContextMenuFactory(contextMenuFactory); callbacks .printOutput(String.format("'Send to %s' option added to the context menu", EXTENSION)); } }
@Override public void actionPerformed(ActionEvent e) { try { requestTemplate = sentRequestBytes; IRequestInfo info = callbacks.getHelpers().analyzeRequest(service, requestTemplate); txtHostname.setText(service.getHost()); cmboProtocol.setSelectedItem(service.getProtocol()); txtResource.setText(info.getUrl().getFile()); txtPort.setText("" + info.getUrl().getPort()); lblRequestTemplate.setText(info.getUrl().toString()); chkUseRequestTemplate.setEnabled(true); chkUseRequestTemplate.setSelected(true); callbacks.printOutput("Laudanum received request template for " + info.getUrl().toString()); extender.selectConfigurableTab(LaudanumClient.this, true); } catch (Exception e1) { callbacks.printError(e1.getMessage()); } } });
@Override public void actionPerformed(ActionEvent e) { try { IExtensionHelpers helpers = callbacks.getHelpers(); IRequestInfo request = helpers.analyzeRequest(service, selectedRequest); callbacks.printOutput("SQLMapper analyzed request: " + request.toString()); tab.setRequestInfo(request, helpers); extender.selectConfigurableTab(SQLMapper.this, true); } catch (Exception e1) { callbacks.printError(e1.getMessage()); } } });
@Override public void extensionUnloaded() { // unregister menu JMenuBar burpMenuBar = rootPane.getJMenuBar(); BurpExtender.getCallbacks().printOutput("Unregistering menu"); burpMenuBar.remove(autoRepeaterJMenu); burpMenuBar.repaint(); }
@Override protected void process(List chunks) { super.process(chunks); String lastMessage = null; int lastPercent = -1; for (Object chunk : chunks) { if (chunk instanceof String) { lastMessage = (String) chunk; callbacks.printOutput(lastMessage); } else if (chunk instanceof Integer) { lastPercent = (Integer) chunk; } } if (lastMessage != null) { l.setStatus(lastMessage); } if (lastPercent > -1) { l.setProgress(lastPercent); } } }
@Override protected void process(List<Object> chunks) { super.process(chunks); String lastMessage = null; int lastPercent = -1; for (Object chunk : chunks) { if (chunk instanceof String) { lastMessage = (String) chunk; callbacks.printOutput(lastMessage); } else if (chunk instanceof Integer) { lastPercent = (Integer) chunk; } } if (lastMessage != null) { l.setStatus(lastMessage); } if (lastPercent > -1) { l.setProgress(lastPercent); } }
@Override protected void process(List chunks) { super.process(chunks); String lastMessage = null; int lastPercent = -1; for (Object chunk : chunks) { if (chunk instanceof String) { lastMessage = (String) chunk; callbacks.printOutput(lastMessage); } else if (chunk instanceof Integer) { lastPercent = (Integer) chunk; } } if (lastMessage != null) { statusListener.setStatus(lastMessage); } if (lastPercent > -1) { statusListener.setProgress(lastPercent); } }
@Override public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) { this.callbacks = callbacks; callbacks.addSuiteTab(this); callbacks.setExtensionName(EXTENSION_NAME); callbacks.printOutput("Started " + EXTENSION_NAME + " version " + VERSION); callbacks.registerContextMenuFactory(this); callbacks.customizeUiComponent(mainPanel); callbacks.customizeUiComponent(sessionsHelpTextPane); }
@Override public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) { this.callbacks = callbacks; callbacks.setExtensionName("Burp Laudanum"); LaudanumClient laudanum = new LaudanumClient(this); callbacks.customizeUiComponent(laudanum.getTabComponent()); callbacks.addSuiteTab(laudanum); callbacks.registerContextMenuFactory(laudanum); callbacks.printOutput("Burp Laudanum Loaded. Version: " + VERSION); }
@Override public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) { this.callbacks = callbacks; callbacks.setExtensionName("SQLMapper"); SQLMapper mapper = new SQLMapper(callbacks, this); callbacks.registerContextMenuFactory(mapper); callbacks.customizeUiComponent(mapper.getTabComponent()); callbacks.addSuiteTab(mapper); callbacks.printOutput("SQLMapper Loaded. Version: " + VERSION); }