diff --git a/tool/src/main/java/migt/BurpExtender.java b/tool/src/main/java/migt/BurpExtender.java index 64fa73c..da82d9d 100644 --- a/tool/src/main/java/migt/BurpExtender.java +++ b/tool/src/main/java/migt/BurpExtender.java @@ -6,6 +6,7 @@ import java.awt.*; import java.io.OutputStream; import java.io.PrintStream; +import java.util.Arrays; import java.util.Objects; /** @@ -175,9 +176,13 @@ private void processMatchedMsg(MessageType msg_type, // TODO: fix randomly replaced messages // sometimes the bytes of the processed message is different from the original one, but the string // of both messages is equal - messageInfo.setRequest(mainPane.act_active_op.processed_message); + if (!Arrays.equals(message.getRequest(), mainPane.act_active_op.processed_message)) { + messageInfo.setRequest(mainPane.act_active_op.processed_message); + } } else { - messageInfo.setResponse(mainPane.act_active_op.processed_message); + if (!Arrays.equals(message.getResponse(), mainPane.act_active_op.processed_message)) { + messageInfo.setResponse(mainPane.act_active_op.processed_message); + } } } } catch (UnsupportedOperationException e) { diff --git a/tool/src/main/java/migt/EditOperation.java b/tool/src/main/java/migt/EditOperation.java index 97a277f..2e412a6 100644 --- a/tool/src/main/java/migt/EditOperation.java +++ b/tool/src/main/java/migt/EditOperation.java @@ -307,12 +307,12 @@ public void execute(List vars) throws ParsingException { this.result = false; return; } - } - applicable = true; - - if (sign) { + } else if (sign) { + applicable = true; tmp_imported_api.jwt.sign = true; tmp_imported_api.jwt.private_key_pem = jwt_private_key_pem; + } else { + throw new ParsingException("missing jwt section in Edit operation"); } break;