| 61 | |
| 62 | |
| 63 | public class BurpExtender implements IBurpExtender, IHttpListener, ITab, IContextMenuFactory |
| 64 | { |
| 65 | private IBurpExtenderCallbacks callbacks; |
| 66 | private IExtensionHelpers helpers; |
| 67 | private PrintWriter stdout;//现在这里定义变量,再在registerExtenderCallbacks函数中实例化,如果都在函数中就只是局部变量,不能在这实例化,因为要用到其他参数。 |
| 68 | public JCheckBox chckbxProxy; |
| 69 | public JCheckBox chckbxScanner; |
| 70 | public JCheckBox chckbxIntruder; |
| 71 | public JCheckBox chckbxRepeater; |
| 72 | public static JTextField textFieldDomain; |
| 73 | public static JTable table; |
| 74 | public JTextField textFieldSecretKey; |
| 75 | public JCheckBox chckbxAppendToEnd; |
| 76 | public JCheckBox chckbxSameAsPara; |
| 77 | public JTextField textFieldConnector; |
| 78 | public JTextArea textAreaFinalString; |
| 79 | public JCheckBox chckbxMD5; |
| 80 | public JCheckBox chckbxSHA1; |
| 81 | public JCheckBox chckbxNewCheckBox_3; |
| 82 | public JTextArea textAreaSign; |
| 83 | public JPanel contentPane; |
| 84 | private final ButtonGroup buttonGroup = new ButtonGroup(); |
| 85 | private final ButtonGroup buttonGroup1 = new ButtonGroup(); |
| 86 | public String extenderName = "Resign v2.2 by bit4"; |
| 87 | private JTextField textFieldParaConnector; |
| 88 | public JLabel lblOrderMethod; |
| 89 | |
| 90 | |
| 91 | |
| 92 | public String secretKey = null; |
| 93 | public int sortedColumn; |
| 94 | public SortOrder sortedMethod; |
| 95 | public String howDealKey = ""; //sameAsPara or appendToEnd |
| 96 | String signPara = null; //the key name of sign parameter |
| 97 | private JTextField textFieldSign; |
| 98 | private JCheckBox chckbxOnlyUseValue; |
| 99 | |
| 100 | |
| 101 | |
| 102 | // implement IBurpExtender |
| 103 | @Override |
| 104 | public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) |
| 105 | {//当加载插件的时候,会调用下面的方法。 |
| 106 | stdout = new PrintWriter(callbacks.getStdout(), true); |
| 107 | //PrintWriter stdout = new PrintWriter(callbacks.getStdout(), true); 这种写法是定义变量和实例化,这里的变量就是新的变量而不是之前class中的全局变量了。 |
| 108 | stdout.println(extenderName+" https://github.com/bit4woo\r\n"); |
| 109 | //System.out.println("test"); 不会输出到burp的 |
| 110 | this.callbacks = callbacks; |
| 111 | helpers = callbacks.getHelpers(); |
| 112 | callbacks.setExtensionName(extenderName); //插件名称 |
| 113 | callbacks.registerHttpListener(this); //如果没有注册,下面的processHttpMessage方法是不会生效的。处理请求和响应包的插件,这个应该是必要的 |
| 114 | callbacks.registerContextMenuFactory(this); |
| 115 | addMenuTab(); |
| 116 | } |
| 117 | |
| 118 | @Override |
| 119 | public void processHttpMessage(int toolFlag,boolean messageIsRequest,IHttpRequestResponse messageInfo) |
| 120 | { |
nothing calls this directly
no outgoing calls
no test coverage detected