mirror of
https://github.com/Maschell/JWUPClient.git
synced 2024-11-21 15:39:16 +01:00
Make it compileable again. Fixed one small issue while copying files.
This commit is contained in:
parent
b676392315
commit
917a2f4dc7
BIN
jwupclient.jar
BIN
jwupclient.jar
Binary file not shown.
@ -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 = ".*";
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -118,7 +118,7 @@ public class FileOperations extends Operations {
|
||||
}
|
||||
i += result_val;
|
||||
Result<byte[]> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user