Better visual feedback during asset decryption

This commit is contained in:
Downforce Agent 2024-07-10 01:47:05 -05:00
parent 34c5f17d71
commit f615b199a4
2 changed files with 40 additions and 0 deletions

View File

@ -148,6 +148,8 @@ public class Bert implements ActionListener {
// dump contents // dump contents
System.out.println("Extracting asset.pkg"); System.out.println("Extracting asset.pkg");
Fozzie popup = new Fozzie();
popup.displayTextOnly("Extracting PKG...", "Extracting");
Process p; Process p;
try { try {
if (!Main.windows) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + Main.inpath + ";wine pkg2zip.exe -x asset.pkg " + key.toString()});} if (!Main.windows) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + Main.inpath + ";wine pkg2zip.exe -x asset.pkg " + key.toString()});}
@ -202,6 +204,8 @@ public class Bert implements ActionListener {
return; return;
} }
popup.setText("<html>Decrypting protected PFS:<br/>" + extracted + "</html>", "Decrypting");
try { try {
if (!Main.windows) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + Main.inpath + ";wine psvpfsparser.exe -i " + extracted + " -o ./temp/ -z " + key.toString() + " -f cma.henkaku.xyz"});} if (!Main.windows) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + Main.inpath + ";wine psvpfsparser.exe -i " + extracted + " -o ./temp/ -z " + key.toString() + " -f cma.henkaku.xyz"});}
else {p = Runtime.getRuntime().exec(new String[]{Main.inpath + "psvpfsparser.exe", "-i", extracted, "-o", "./temp/", "-z", key.toString(), "-f", "cma.henkaku.xyz"}, null, new File(Main.inpath));} else {p = Runtime.getRuntime().exec(new String[]{Main.inpath + "psvpfsparser.exe", "-i", extracted, "-o", "./temp/", "-z", key.toString(), "-f", "cma.henkaku.xyz"}, null, new File(Main.inpath));}
@ -228,6 +232,8 @@ public class Bert implements ActionListener {
return; return;
} }
popup.setText("Deleting temporary files...", "Cleaning Up");
// stage & cleanup // stage & cleanup
System.out.println("Cleaning up"); System.out.println("Cleaning up");
new File(Main.inpath + "asset.pkg").delete(); new File(Main.inpath + "asset.pkg").delete();
@ -237,6 +243,8 @@ public class Bert implements ActionListener {
Main.deleteDir(new File(Main.inpath + "addcont/")); Main.deleteDir(new File(Main.inpath + "addcont/"));
Main.deleteDir(new File(Main.inpath + "temp/")); Main.deleteDir(new File(Main.inpath + "temp/"));
popup.destroyDialog();
// restore controls // restore controls
JOptionPane.showMessageDialog(frame, "Assets downloaded successfully.", "Download Complete", JOptionPane.INFORMATION_MESSAGE); JOptionPane.showMessageDialog(frame, "Assets downloaded successfully.", "Download Complete", JOptionPane.INFORMATION_MESSAGE);
invoker.setEnabled(true); invoker.setEnabled(true);

View File

@ -96,6 +96,38 @@ public class Fozzie {
} }
} }
public void displayTextOnly(String text, String title) {
frame.add(frameContainer);
frame.setSize(300, 100);
frame.setTitle(title);
frame.setResizable(false);
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
frame.setLayout(new GridLayout());
frame.setLocationRelativeTo(null);
frame.setAlwaysOnTop(true);
try {
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
frame.setIconImage(windowIcon);
} catch (IOException e) {
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
}
frame.setVisible(true);
label.setText(text);
progressBar.setVisible(false);
}
public void setText(String text, String title) {
label.setText(text);
frame.setTitle(title);
}
public void destroyDialog() {
frame.setVisible(false);
frame.dispose();
}
public void disconnect() throws IOException { public void disconnect() throws IOException {
inputStream.close(); inputStream.close();
httpConn.disconnect(); httpConn.disconnect();