77import burp .api .montoya .ui .editor .extension .*;
88import com .chave .Main ;
99import com .chave .config .SensitiveInfoConfig ;
10- import com .chave .config .UserConfig ;
11- import com .chave .service .APIMatchService ;
1210import com .chave .service .SensitiveInfoMatchService ;
11+ import com .chave .utils .Util ;
1312
1413import javax .swing .*;
1514import javax .swing .table .DefaultTableCellRenderer ;
1615import javax .swing .table .DefaultTableModel ;
1716import javax .swing .table .JTableHeader ;
1817import javax .swing .table .TableCellRenderer ;
1918import java .awt .*;
20- import java .lang .reflect .Method ;
2119import java .util .ArrayList ;
2220import java .util .HashMap ;
2321import java .util .Set ;
@@ -32,7 +30,6 @@ public ExtensionProvidedHttpResponseEditor provideHttpResponseEditor(EditorCreat
3230 private static class Editor implements ExtensionProvidedHttpResponseEditor {
3331 private HttpRequestResponse requestResponse ;
3432 private final JTabbedPane jTabbedPane = new JTabbedPane ();
35- private APIMatchService apiMatchService = new APIMatchService ();
3633 private SensitiveInfoMatchService sensitiveInfoMatchService = new SensitiveInfoMatchService ();
3734
3835 public Editor () {
@@ -53,8 +50,7 @@ public boolean isEnabledFor(HttpRequestResponse requestResponse) {
5350 HttpResponse response = requestResponse .response ();
5451 HttpRequest request = requestResponse .request ();
5552 try {
56- Method matchMethod = APIMatchService .class .getMethod (UserConfig .MATCH_MOD .name (), HttpRequest .class );
57- HashMap apiMatchResult = (HashMap ) matchMethod .invoke (apiMatchService , request );
53+ HashMap apiMatchResult = Util .getAPIMatchResult (request );
5854 boolean isMatched = (boolean ) apiMatchResult .get ("isMatched" );
5955 if (isMatched && SensitiveInfoConfig .IS_CHECK_SENSITIVE_INFO ) {
6056 HashMap result = sensitiveInfoMatchService .sensitiveInfoMatch (response );
0 commit comments