| 31 | } |
| 32 | |
| 33 | @Override |
| 34 | public List<JMenuItem> createMenuItems(IContextMenuInvocation invocation) { |
| 35 | if (availableToolFlag.contains(invocation.getInvocationContext())) { |
| 36 | ArrayList<JMenuItem> menuItemList = new ArrayList<JMenuItem>(); |
| 37 | JMenuItem AutoAPIScan = new JMenuItem("Do Auto API Scan"); |
| 38 | JMenuItem TargetAPIScan2 = new JMenuItem("Do Target API Scan"); |
| 39 | AutoAPIScan.addActionListener(new ContextMenuActionListener(invocation)); |
| 40 | TargetAPIScan2.addActionListener(new ActionListener() { |
| 41 | |
| 42 | @Override |
| 43 | public void actionPerformed(ActionEvent arg0) { |
| 44 | try { |
| 45 | TargetAPIConfigPanel panel = new TargetAPIConfigPanel(); |
| 46 | BurpExtender.getCallbacks().customizeUiComponent(panel); |
| 47 | panel.setVisible(true); |
| 48 | } catch (Exception e) { |
| 49 | e.printStackTrace(BurpExtender.getStderr()); |
| 50 | } |
| 51 | } |
| 52 | }); |
| 53 | menuItemList.add(AutoAPIScan); |
| 54 | menuItemList.add(TargetAPIScan2); |
| 55 | return menuItemList; |
| 56 | } |
| 57 | return null; |
| 58 | } |
| 59 | |
| 60 | static class ContextMenuActionListener |
| 61 | implements ActionListener { |