diff --git a/jwupclient.jar b/jwupclient.jar index 7bee75a..230bedb 100644 Binary files a/jwupclient.jar and b/jwupclient.jar differ diff --git a/src/de/mas/wupclient/Starter.java b/src/de/mas/wupclient/Starter.java index b738c45..8eb1250 100644 --- a/src/de/mas/wupclient/Starter.java +++ b/src/de/mas/wupclient/Starter.java @@ -5,8 +5,6 @@ import java.util.Scanner; import de.mas.wupclient.client.WUPClient; import de.mas.wupclient.client.operations.DownloadUploadOperations; import de.mas.wupclient.client.operations.DumperOperations; -import de.mas.wupclient.client.operations.FileOperations; -import de.mas.wupclient.client.operations.SpecialOperations; import de.mas.wupclient.client.operations.UtilOperations; public class Starter { @@ -19,7 +17,8 @@ public class Starter { try { boolean exit = false; - System.out.println("JWUPClient. Please enter a command. Enter \"exit\" to exit."); + System.out.println("JWUPClient 0.1a"); + System.out.println("Please enter a command. Enter \"exit\" to exit."); System.out.println(); System.out.print(w.getCwd() + " > "); Scanner reader = new Scanner(System.in); // Reading from System.in @@ -29,6 +28,7 @@ public class Starter { String input = reader.nextLine(); if(input.equals("exit")){ exit = true; + break; } processCommand(input,w); @@ -52,7 +52,6 @@ public class Starter { return; } UtilOperations util = UtilOperations.UtilOperationsFactory(w); - SpecialOperations special = SpecialOperations.SpecialOperationsFactory(w); DownloadUploadOperations dlul = DownloadUploadOperations.DownloadUploadOperationsFactory(w); DumperOperations dump = DumperOperations.DumperOperationsFactory(w); @@ -118,10 +117,6 @@ public class Starter { dlul.downloadFile("", inputs[1],inputs[2] + "/" + w.getCwd()); } - break; - case "nandtickets": //download to full path - special.parseAndDownloadTickets(); - break; case "dumpdisc": String pattern = ".*"; diff --git a/src/de/mas/wupclient/client/WUPClient.java b/src/de/mas/wupclient/client/WUPClient.java index 1112e73..7897f79 100644 --- a/src/de/mas/wupclient/client/WUPClient.java +++ b/src/de/mas/wupclient/client/WUPClient.java @@ -125,10 +125,11 @@ public class WUPClient { clientSocket = new Socket(ip, 1337); } catch (UnknownHostException e) { Logger.logErr("Unkown Host"); - e.printStackTrace(); + Logger.logErr("Make sure you entered the correct ip (tried " + ip + ") and the wupserver in running."); + System.exit(-1); } catch (IOException e) { Logger.logErr("IO Error Host"); - e.printStackTrace(); + System.exit(-1); } setSocket(clientSocket); Logger.log("Connected to " + ip); diff --git a/src/de/mas/wupclient/client/operations/DumperOperations.java b/src/de/mas/wupclient/client/operations/DumperOperations.java index fa7988a..028b931 100644 --- a/src/de/mas/wupclient/client/operations/DumperOperations.java +++ b/src/de/mas/wupclient/client/operations/DumperOperations.java @@ -1,17 +1,11 @@ package de.mas.wupclient.client.operations; import java.io.ByteArrayInputStream; -import java.io.FileOutputStream; import java.io.IOException; -import java.util.Arrays; import java.util.HashMap; -import java.util.Iterator; -import java.util.List; import java.util.Map; -import java.util.Map.Entry; import de.mas.wupclient.client.WUPClient; -import de.mas.wupclient.client.utils.FEntry; import de.mas.wupclient.client.utils.Logger; import de.mas.wupclient.client.utils.MetaInformation; import de.mas.wupclient.client.utils.Utils; diff --git a/src/de/mas/wupclient/client/operations/FileOperations.java b/src/de/mas/wupclient/client/operations/FileOperations.java index 78c6ff7..967be14 100644 --- a/src/de/mas/wupclient/client/operations/FileOperations.java +++ b/src/de/mas/wupclient/client/operations/FileOperations.java @@ -118,7 +118,7 @@ public class FileOperations extends Operations { } i += result_val; Result result_write = fsa.FSA_WriteFilePtr(fsa_handle, dst_handle, 0x1, result_val, buffer_ptr); - int result_write_val = result_read.getResultValue(); + int result_write_val = result_write.getResultValue(); if(result_write_val < 0){ Logger.log("copyFile error: writing destination file failed."); result = false;