mirror of
https://github.com/Maschell/JNUSTool.git
synced 2025-01-07 05:48:18 +01:00
Added encrypted dl via commandline
updated csv version bump
This commit is contained in:
parent
f8078354e3
commit
1d1d4b4d44
BIN
JNUSTool.jar
BIN
JNUSTool.jar
Binary file not shown.
BIN
jar/JNUSTool.jar
BIN
jar/JNUSTool.jar
Binary file not shown.
@ -288,6 +288,7 @@
|
|||||||
0005000E-101AC900;2;WUP;004Q;WUP-P-BD3E;BD3E4Q;DISNEY INFINITY 3.0 EDITION;16,32,49,65
|
0005000E-101AC900;2;WUP;004Q;WUP-P-BD3E;BD3E4Q;DISNEY INFINITY 3.0 EDITION;16,32,49,65
|
||||||
0005000E-101AFE00;4;WUP;00VZ;WUP-P-BFNP;BFNPVZ;Adventure Time Finn and Jake Investigations;16
|
0005000E-101AFE00;4;WUP;00VZ;WUP-P-BFNP;BFNPVZ;Adventure Time Finn and Jake Investigations;16
|
||||||
0005000E-101AFF00;1;WUP;0001;WUP-U-AFXJ;AFXJ01;Star Fox Zero;16
|
0005000E-101AFF00;1;WUP;0001;WUP-U-AFXJ;AFXJ01;Star Fox Zero;16
|
||||||
|
0005000E-101B0400;2;WUP;0001;WUP-U-AFXE;AFXE01;Star Fox Zero;16
|
||||||
0005000E-101B3D00;4;WUP;004Q;WUP-P-BD3P;BD3P4Q;DISNEY INFINITY 3.0: PLAY WITHOUT LIMITS;16,32,49,64
|
0005000E-101B3D00;4;WUP;004Q;WUP-P-BD3P;BD3P4Q;DISNEY INFINITY 3.0: PLAY WITHOUT LIMITS;16,32,49,64
|
||||||
0005000E-101B3E00;4;WUP;004Q;WUP-P-BD3Z;BD3Z4Q;DISNEY INFINITY 3.0: PLAY WITHOUT LIMITS;16,32,49,64
|
0005000E-101B3E00;4;WUP;004Q;WUP-P-BD3Z;BD3Z4Q;DISNEY INFINITY 3.0: PLAY WITHOUT LIMITS;16,32,49,64
|
||||||
0005000E-101B8500;2;WUP;0052;WUP-P-BS5E;BS5E52;Skylanders SuperChargers;16,32,48,64,80,96
|
0005000E-101B8500;2;WUP;0052;WUP-P-BS5E;BS5E52;Skylanders SuperChargers;16,32,48,64,80,96
|
||||||
|
|
BIN
release.zip
BIN
release.zip
Binary file not shown.
@ -4,13 +4,14 @@ import javax.swing.JFrame;
|
|||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
import de.mas.jnustool.gui.NUSGUI;
|
import de.mas.jnustool.gui.NUSGUI;
|
||||||
|
import de.mas.jnustool.util.Settings;
|
||||||
|
|
||||||
public class Logger {
|
public class Logger {
|
||||||
|
|
||||||
public static void log(String string) {
|
public static void log(String string) {
|
||||||
NUSGUI.output.append(string + "\n");
|
NUSGUI.output.append(string + "\n");
|
||||||
NUSGUI.output.setCaretPosition(NUSGUI.output.getDocument().getLength());
|
NUSGUI.output.setCaretPosition(NUSGUI.output.getDocument().getLength());
|
||||||
//System.out.println(string);
|
if(Settings.logToPrintLn) System.out.println(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void messageBox(String string) {
|
public static void messageBox(String string) {
|
||||||
|
@ -46,6 +46,10 @@ public class NUSTitle {
|
|||||||
public NUSTitle(long titleId,int version, String key) {
|
public NUSTitle(long titleId,int version, String key) {
|
||||||
setVersion(version);
|
setVersion(version);
|
||||||
setTitleID(titleId);
|
setTitleID(titleId);
|
||||||
|
if(version != -1){
|
||||||
|
Logger.log("Version " + version);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
/*
|
/*
|
||||||
if(Settings.downloadContent){
|
if(Settings.downloadContent){
|
||||||
@ -163,14 +167,17 @@ public class NUSTitle {
|
|||||||
decryption.init(ticket.getDecryptedKey(),0);
|
decryption.init(ticket.getDecryptedKey(),0);
|
||||||
byte[] decryptedFST = decryption.decrypt(encryptedFST);
|
byte[] decryptedFST = decryption.decrypt(encryptedFST);
|
||||||
|
|
||||||
fst = new FST(decryptedFST,tmd);
|
try{
|
||||||
|
fst = new FST(decryptedFST,tmd);
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
tmd.setNUSTitle(this);
|
tmd.setNUSTitle(this);
|
||||||
|
|
||||||
setTargetPath(String.format("%016X", getTitleID()));
|
setTargetPath(String.format("%016X", getTitleID()));
|
||||||
setLongNameFolder(String.format("%016X", getTitleID()));
|
setLongNameFolder(String.format("%016X", getTitleID()));
|
||||||
|
|
||||||
if(fst.metaFENtry != null){
|
if(fst != null && fst.metaFENtry != null){
|
||||||
byte[] metaxml = fst.metaFENtry.downloadAsByteArray();
|
byte[] metaxml = fst.metaFENtry.downloadAsByteArray();
|
||||||
if(metaxml != null){
|
if(metaxml != null){
|
||||||
InputStream bis = new ByteArrayInputStream(metaxml);
|
InputStream bis = new ByteArrayInputStream(metaxml);
|
||||||
@ -188,10 +195,10 @@ public class NUSTitle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Logger.log("Total Size of Content Files: " + ((int)((getTotalContentSize()/1024.0/1024.0)*100))/100.0 +" MB");
|
Logger.log("Total Size of Content Files: " + ((int)((getTotalContentSize()/1024.0/1024.0)*100))/100.0 +" MB");
|
||||||
Logger.log("Total Size of Decrypted Files: " + ((int)((fst.getTotalContentSizeInNUS()/1024.0/1024.0)*100))/100.0 +" MB");
|
if(fst != null)Logger.log("Total Size of Decrypted Files: " + ((int)((fst.getTotalContentSizeInNUS()/1024.0/1024.0)*100))/100.0 +" MB");
|
||||||
Logger.log("Entries: " + fst.getTotalEntries());
|
if(fst != null)Logger.log("Entries: " + fst.getTotalEntries());
|
||||||
Logger.log("Files: " + fst.getFileCount());
|
if(fst != null)Logger.log("Files: " + fst.getFileCount());
|
||||||
Logger.log("Files in NUSTitle: " + fst.getFileCountInNUS());
|
if(fst != null)Logger.log("Files in NUSTitle: " + fst.getFileCountInNUS());
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
@ -220,7 +227,7 @@ public class NUSTitle {
|
|||||||
fos.close();
|
fos.close();
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
Logger.log("Random error.");
|
Logger.log("Error while creating ticket files.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,7 +313,7 @@ public class NUSTitle {
|
|||||||
public void decryptFEntries(List<FEntry> list,Progress progress) {
|
public void decryptFEntries(List<FEntry> list,Progress progress) {
|
||||||
Util.createSubfolder(getTargetPath());
|
Util.createSubfolder(getTargetPath());
|
||||||
//progress = null;
|
//progress = null;
|
||||||
ForkJoinPool pool = ForkJoinPool.commonPool();
|
ForkJoinPool pool = new ForkJoinPool(25);
|
||||||
List<FEntryDownloader> dlList = new ArrayList<>();
|
List<FEntryDownloader> dlList = new ArrayList<>();
|
||||||
for(FEntry f : list){
|
for(FEntry f : list){
|
||||||
if(!f.isDir() && f.isInNUSTitle()){
|
if(!f.isDir() && f.isInNUSTitle()){
|
||||||
|
@ -24,7 +24,7 @@ public class Starter {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
Logger.log("JNUSTool 0.0.6 - alpha - by Maschell");
|
Logger.log("JNUSTool 0.0.7 - alpha - by Maschell");
|
||||||
Logger.log("");
|
Logger.log("");
|
||||||
try {
|
try {
|
||||||
readConfig();
|
readConfig();
|
||||||
@ -39,11 +39,30 @@ public class Starter {
|
|||||||
long titleID = 0;
|
long titleID = 0;
|
||||||
String key = null;
|
String key = null;
|
||||||
if(args.length != 0 ){
|
if(args.length != 0 ){
|
||||||
titleID = Util.StringToLong(args[0]);
|
titleID = Util.StringToLong(args[0]);
|
||||||
|
int version = -1;
|
||||||
if( args.length > 1 && args[1].length() == 32){
|
if( args.length > 1 && args[1].length() == 32){
|
||||||
key = args[1].substring(0, 32);
|
key = args[1].substring(0, 32);
|
||||||
}
|
}
|
||||||
if(titleID != 0){
|
|
||||||
|
if(titleID != 0){
|
||||||
|
boolean dl_encrypted = false;
|
||||||
|
for(int i =0; i< args.length;i++){
|
||||||
|
if(args[i].startsWith("v")){
|
||||||
|
version = Integer.parseInt((args[i].substring(1)));
|
||||||
|
}
|
||||||
|
if(args[i].equals("-dlEncrypted")){
|
||||||
|
dl_encrypted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(dl_encrypted){
|
||||||
|
NUSTitle title = new NUSTitle(titleID,version, key);
|
||||||
|
try {
|
||||||
|
title.downloadEncryptedFiles(null);
|
||||||
|
} catch (IOException e) {
|
||||||
|
}
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
NUSGUI m = new NUSGUI(new NUSTitle(titleID,-1, key));
|
NUSGUI m = new NUSGUI(new NUSTitle(titleID,-1, key));
|
||||||
m.setVisible(true);
|
m.setVisible(true);
|
||||||
}
|
}
|
||||||
|
@ -10,4 +10,5 @@ public class Settings {
|
|||||||
public static boolean skipExistingTMDTICKET = true;
|
public static boolean skipExistingTMDTICKET = true;
|
||||||
public static boolean DL_ALL_VERSIONS = false;
|
public static boolean DL_ALL_VERSIONS = false;
|
||||||
public static String FILELIST_NAME = "filelist.txt";
|
public static String FILELIST_NAME = "filelist.txt";
|
||||||
|
public static boolean logToPrintLn = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user