Added: Harman AIR 51 unpacker for binarydata with custom key

This commit is contained in:
Jindra Petřík
2024-08-27 09:43:40 +02:00
parent 87aea2a2e1
commit c7c4ab8fc0
20 changed files with 219 additions and 40 deletions
@@ -78,7 +78,7 @@ public final class BinaryPanel extends JPanel {
@Override
public void mouseClicked(MouseEvent e) {
if (binaryData.getUsedPacker() != null) {
binaryData.unpack(binaryData.getUsedPacker());
binaryData.unpack(binaryData.getUsedPacker(), binaryData.getPackerKey());
}
mainPanel.loadFromBinaryTag(binaryData);
swfOrPackedDataInsidePanel.setVisible(false);
@@ -993,4 +993,7 @@ addfunction.result=New method info id generated: %method_info_index%. Press OK t
addfunction.result.title=New method info
#after 21.0.2
filter.air.as3proj = FlashDevelop AIR AS3 project (*.as3proj)
filter.air.as3proj = FlashDevelop AIR AS3 project (*.as3proj)
packer.key.title = Key for: %packer%
packer.key = Enter key for the packer "%packer%":
@@ -2483,9 +2483,16 @@ public class TagTreeContextMenu extends JPopupMenu {
private void applyUnpackerActionPerformed(Packer packer) {
List<TreeItem> sel = getSelectedItems();
String key = null;
if (packer.usesKey()) {
key = ViewMessages.showInputDialog(mainPanel, AppStrings.translate("packer.key").replace("%packer%", packer.getName()), AppStrings.translate("packer.key.title").replace("%packer%", packer.getName()), "");
if (key == null || key.isEmpty()) {
return;
}
}
for (TreeItem item : sel) {
BinaryDataInterface binaryData = (BinaryDataInterface) item;
if (!binaryData.unpack(packer)) {
if (!binaryData.unpack(packer, key)) {
ViewMessages.showMessageDialog(mainPanel, AppStrings.translate("error.wrong.packer").replace("%item%", item.toString()).replace("%packer%", packer.getName()), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
}
}