Clear issue description for PFS0 (non-encrypted)
This commit is contained in:
parent
3c191c42e1
commit
d917d4c22f
6 changed files with 70 additions and 31 deletions
|
@ -86,7 +86,7 @@ public class MainController implements Initializable {
|
|||
else
|
||||
fileChooser.setInitialDirectory(new File(System.getProperty("user.home")));
|
||||
|
||||
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("NS files", "*.nsp", "*.xci", "*.nca", "*.tik", "*.xml", "*.npdm"));
|
||||
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("NS files", "*.nsp", "*.nsz", "*.xci", "*.nca", "*.tik", "*.xml", "*.npdm"));
|
||||
|
||||
this.selectedFile = fileChooser.showOpenDialog(analyzeBtn.getScene().getWindow());
|
||||
// todo: fix
|
||||
|
@ -102,18 +102,28 @@ public class MainController implements Initializable {
|
|||
filenameSelected.setText(this.selectedFile.getAbsolutePath());
|
||||
previouslyOpenedPath = this.selectedFile.getParent();
|
||||
analyzeBtn.setDisable(false);
|
||||
if (this.selectedFile.getName().toLowerCase().endsWith(".nsp"))
|
||||
String fileExtension = this.selectedFile.getName().toLowerCase().replaceAll("^.*\\.", "");
|
||||
switch (fileExtension){
|
||||
case "nsp":
|
||||
case "nsz":
|
||||
tabPane.getSelectionModel().select(0);
|
||||
else if (this.selectedFile.getName().toLowerCase().endsWith(".xci"))
|
||||
break;
|
||||
case "xci":
|
||||
tabPane.getSelectionModel().select(1);
|
||||
else if (this.selectedFile.getName().toLowerCase().endsWith(".nca"))
|
||||
break;
|
||||
case "nca":
|
||||
tabPane.getSelectionModel().select(2);
|
||||
else if (this.selectedFile.getName().toLowerCase().endsWith(".tik"))
|
||||
break;
|
||||
case "tic":
|
||||
tabPane.getSelectionModel().select(3);
|
||||
else if (this.selectedFile.getName().toLowerCase().endsWith(".xml"))
|
||||
break;
|
||||
case "xml":
|
||||
tabPane.getSelectionModel().select(4);
|
||||
else if (this.selectedFile.getName().toLowerCase().endsWith(".npdm"))
|
||||
break;
|
||||
case "npdm":
|
||||
tabPane.getSelectionModel().select(5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
logArea.clear();
|
||||
|
@ -122,18 +132,28 @@ public class MainController implements Initializable {
|
|||
* Start analyze
|
||||
* */
|
||||
private void analyzeFile(){
|
||||
if (selectedFile.getName().toLowerCase().endsWith("nsp"))
|
||||
final String fileExtension = selectedFile.getName().toLowerCase().replaceAll("^.*\\.", "");
|
||||
switch (fileExtension){
|
||||
case "nsp":
|
||||
case "nsz":
|
||||
NSPTabController.analyze(selectedFile); // TODO: NSP OR XCI
|
||||
else if (selectedFile.getName().toLowerCase().endsWith("xci"))
|
||||
break;
|
||||
case "xci":
|
||||
XCITabController.analyze(selectedFile);
|
||||
else if (selectedFile.getName().toLowerCase().endsWith("nca"))
|
||||
break;
|
||||
case "nca":
|
||||
NCATabController.analyze(selectedFile);
|
||||
else if (selectedFile.getName().toLowerCase().endsWith("tik"))
|
||||
break;
|
||||
case "tic":
|
||||
TIKTabController.analyze(selectedFile);
|
||||
else if (selectedFile.getName().toLowerCase().endsWith("xml"))
|
||||
break;
|
||||
case "xml":
|
||||
XMLTabController.analyze(selectedFile);
|
||||
else if (selectedFile.getName().toLowerCase().endsWith("npdm"))
|
||||
break;
|
||||
case "npdm":
|
||||
NPDMTabController.analyze(selectedFile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@FXML
|
||||
private void showHideLogs(){
|
||||
|
|
|
@ -193,8 +193,27 @@ public class NCAProvider {
|
|||
decryptedKey2 = cipher.doFinal(encryptedKey2);
|
||||
decryptedKey3 = cipher.doFinal(encryptedKey3);
|
||||
}
|
||||
else
|
||||
throw new Exception("key_are_key_[UNKNOWN] requested ("+keyIndex+"). Not supported.");
|
||||
else{
|
||||
StringBuilder exceptionStringBuilder = new StringBuilder("key_area_key_");
|
||||
switch (keyIndex){
|
||||
case 0:
|
||||
exceptionStringBuilder.append("application_");
|
||||
break;
|
||||
case 1:
|
||||
exceptionStringBuilder.append("ocean_");
|
||||
break;
|
||||
case 2:
|
||||
exceptionStringBuilder.append("system_");
|
||||
break;
|
||||
default:
|
||||
exceptionStringBuilder.append(keyIndex);
|
||||
exceptionStringBuilder.append("[UNKNOWN]_");
|
||||
}
|
||||
exceptionStringBuilder.append(String.format("%02d", cryptoTypeReal));
|
||||
exceptionStringBuilder.append(" requested. Not supported or not found.");
|
||||
|
||||
throw new Exception(exceptionStringBuilder.toString());
|
||||
}
|
||||
}
|
||||
|
||||
tableEntry0 = new NCAHeaderTableEntry(tableBytes);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
btnFileOpen=Select NSP/XCI/NCA/TIK/XML
|
||||
btnFileOpen=Select
|
||||
btnAnalyze=Analyze
|
||||
lblNoFileSelected=No files selected.
|
||||
tableNumberLbl=#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
btnFileOpen=Selectionner NSP/XCI/NCA/TIK/XML
|
||||
btnFileOpen=Selectionner
|
||||
btnAnalyze=Analyser
|
||||
lblNoFileSelected=Aucuns fichiers s\u00E9lectionn\u00E9s.
|
||||
tableUploadLbl=Extraire ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
btnFileOpen=\u0412\u044B\u0431\u0440\u0430\u0442\u044C NSP/XCI/NCA/TIK/XML
|
||||
btnFileOpen=\u0412\u044B\u0431\u0440\u0430\u0442\u044C
|
||||
btnAnalyze=\u0410\u043D\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C
|
||||
lblNoFileSelected=\u0424\u0430\u0439\u043B\u044B \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u044B.
|
||||
tableUploadLbl=\u0420\u0430\u0441\u043F\u0430\u043A\u043E\u0432\u0430\u0442\u044C?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
btnFileOpen=\u0412\u0438\u0431\u0440\u0430\u0442\u0438 NSP/XCI/NCA/TIK/XML
|
||||
btnFileOpen=\u0412\u0438\u0431\u0440\u0430\u0442\u0438
|
||||
btnAnalyze=\u0410\u043D\u0430\u043B\u0456\u0437\u0443\u0432\u0430\u0442\u0438
|
||||
lblNoFileSelected=\u0424\u0430\u0439\u043B\u0438 \u043D\u0435 \u0432\u0438\u0431\u0440\u0430\u043D\u0456.
|
||||
tableNumberLbl=\u2116
|
||||
|
|
Loading…
Reference in a new issue