gpt4 book ai didi

java - 用 Java 解密 .SWF 文件

转载 作者:太空宇宙 更新时间:2023-11-04 11:37:55 24 4
gpt4 key购买 nike

我最近几个小时正在解密 swf 文件,I am following this Code但是当我尝试运行此代码时,我收到此异常:

Exception in thread "main" java.lang.IllegalArgumentException

这是代码:

public static void main(String[] args) {
FileTest decrypter = new FileTest();
try {
File inputFile = new File("game.swf");
InputStream inputStream = new FileInputStream(inputFile);
ByteBuffer buffer = ByteBuffer.allocate((int) inputFile.length());
inputStream.read(buffer.array());
decrypter.handle(buffer, new File("output.swf")); //**gives Exception**
} catch (IOException e) {
e.printStackTrace();
}
}

目标是读取game.swf加密文件并在output.swf中解密。

谢谢

最佳答案

好吧,您没有添加该类的所有函数和静态方法。尝试将其添加为所有这些方法及其当前代码的文件代码。我删除了所有代码,因为有很多输入,但是这个东西可以工作,当然,您需要主类中的所有这五个方法以及代码。

public static void decompress(byte[] data, File outputFile) 

public void unpack(ByteBuffer buffer, File outputFile)

private void handle(ByteBuffer buffer, File outputFile)

private ByteBuffer removeNonce(ByteBuffer buffer)

private ByteBuffer decrypt(ByteBuffer buffer)

关于java - 用 Java 解密 .SWF 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43078434/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com