From 873858149fc26a3dc39c20f6fb4400846a84ab9b Mon Sep 17 00:00:00 2001 From: whocansee <91185289+whocansee@users.noreply.github.com> Date: Fri, 13 Oct 2023 21:33:50 +0800 Subject: [PATCH] Update Session.java --- cli/src/main/java/ysomap/cli/Session.java | 39 +++++++++++++---------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/cli/src/main/java/ysomap/cli/Session.java b/cli/src/main/java/ysomap/cli/Session.java index 8af8bf0..4ba7846 100644 --- a/cli/src/main/java/ysomap/cli/Session.java +++ b/cli/src/main/java/ysomap/cli/Session.java @@ -122,22 +122,28 @@ public HashMap update(Class clazz){ return settings; } - public void setValue(String key, String value) throws ArgumentsMissMatchException { - if("serializeType".equals(key) && payload != null){ - payload.setSerializeType(value); - return; - }else if("encoder".equals(key) && payload != null){ - payload.setEncoder(value); - return; - }else if("output".equals(key) && payload != null){ - payload.setOutputType(value); - return; - }else if("serialVersionUID".equals(key) && payload != null){ - payload.setSerialVersionUID(value); - return; - }else if("checkRunning".equals(key)){ - isCheckRunning = Boolean.parseBoolean(value); - return; + public void setValue(String key, String value) throws Exception { + if(payload != null && payload.has(key)){ + if("serializeType".equals(key) && payload != null){ + payload.setSerializeType(value); + return; + }else if("encoder".equals(key) && payload != null){ + payload.setEncoder(value); + return; + }else if("output".equals(key) && payload != null){ + payload.setOutputType(value); + return; + }else if("serialVersionUID".equals(key) && payload != null){ + payload.setSerialVersionUID(value); + return; + }else if("checkRunning".equals(key)){ + isCheckRunning = Boolean.parseBoolean(value); + return; + } + else if("wrapped".equals(key)){ + payload.set("wrapped",Boolean.parseBoolean(value)); + return; + } } if(exploit != null && exploit.has(key)){ @@ -204,6 +210,7 @@ public void printSessionDetails(){ Logger.normal("Current Serializer Encoder: "+ColorStyle.makeWordRed(payload.getEncoder())); Logger.normal("Current Serializer Output Type: "+ColorStyle.makeWordRed(payload.getOutputType())); Logger.normal("Current Serializer serialVersionUID: "+ColorStyle.makeWordRed(payload.getSerialVersionUID())); + if(payload.has("wrapped")){Logger.normal("Current wrapped(to bypass blacklist): "+ColorStyle.makeWordRed(payload.get("wrapped")));} if(bullet == null){ Printer.printCandidates("bullets", clazz, false, null); }