Skip to content

Commit

Permalink
add dump function
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1t3p1g committed Oct 14, 2023
1 parent 4ae96eb commit 40675e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/src/main/java/ysomap/cli/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public void list() throws ArgumentsMissMatchException {
}

public void dump(){
if(curSession != null){
if(args.size() == 1 && curSession != null){
StringBuilder sb = new StringBuilder();
Map<String, String> parameters = new HashMap<>();
if(curSession.exploit != null){
Expand All @@ -405,7 +405,7 @@ public void dump(){

sb.append("run\n");
try {
FileHelper.filePutContent("dumped.yso", sb.toString().getBytes());
FileHelper.filePutContent(args.get(0), sb.toString().getBytes());
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -544,7 +544,7 @@ public void help() {
"session {c|i} recover to a session or create a new session\n" +
"sessions print current running exploit sessions\n" +
"stop stop current session\n" +
"dump dump current session's parameters\n" +
"dump /path/to/yso dump current session's parameters\n" +
"script /path/to/yso load a yso script\n" +
"kill {uuid|all} kill sessions, like 'kill uuid' or 'kill all'\n" +
"exit exit ysomap\n";
Expand Down

0 comments on commit 40675e6

Please sign in to comment.