Skip to content

Commit

Permalink
Update Session.java
Browse files Browse the repository at this point in the history
  • Loading branch information
whocansee authored Oct 13, 2023
1 parent 7fc092b commit 8738581
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions cli/src/main/java/ysomap/cli/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,28 @@ public HashMap<String, Object> 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)){
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 8738581

Please sign in to comment.