Manifest-Version: 1.0Application-Name: Aspose.Cells for javaImplementation-Title: Aspose.Cells for javaCopyright: Copyright 2001-2021 Aspose Pty LtdBundle-SymbolicName: com.aspose.cellsImplementation-Version: 21.2.0Release-Date: 2021-02-04Specification-Vendor: Aspose Pty LtdBundle-ManifestVersion: 2Specification-Title: Aspose.Cells for javaApplication-Library-Allowable-Codebase: *Bundle-Vendor: Aspose Pty LtdImport-Package: javax.xml.parsers,org.w3c.dom,org.xml.sax,javax.crypto;resolution:="optional",javax.crypto.spec;resolution:="optional",javax.security.cert;resolution:="optional",com.sun.image.codec.jpeg;resolution:="optional",javax.imageio;resolution:="optional",javax.imageio.metadata;resolution:="optional",javax.imageio.stream;resolution:="optional",com.sun.media.imageio.plugins.tiff;resolution:="optional",javax.media.jai;resolution:="optional",javax.print;resolution:="optional",javax.print.attribute;resolution:="optional",javax.print.attribute.standard;resolution:="optional",org.apache.tools.zip;resolution:="optional",org.bouncycastle.jce.provider;resolution:="optional"Implementation-Vendor: Aspose Pty LtdExport-Package: com.aspose.cellsMinimum-JDK: 1.6Bundle-Name: Aspose.Cells for javaBundle-Version: 21.2.0Caller-Allowable-Codebase: *Permissions: all-permissionsName: Aspose.Cells for javaSpecification-Version: 21.2.0Created-By: 1.8.0_172 (Oracle Corporation)
=========================================
-cells-23.6
同样根据方法设置许可证入手,反编译阅读源码 。
文章插图
根据关键代码进入 v_9 类中的 a 方法 。
生成 .class 文件
public static void main(String[] args) {try {ClassPool pool = ClassPool.getDefault();// jar文件路径pool.insertClassPath("D:/aspose-cells-23.6.jar");// 类名CtClass ctClass = pool.get("com.aspose.cells.License");// 方法名和参数CtMethod ctMethod = ctClass.getMethod("setLicense", "(Ljava/io/InputStream;)V");ctMethod.setBody("{ org.w3c.dom.Document document = null;com.aspose.cells.v_9 v_9 = new com.aspose.cells.v_9();v_9.a(document); }");// 方法名和参数ctMethod = ctClass.getMethod("setLicense", "(Ljava/lang/String;)V");ctMethod.setBody("{ org.w3c.dom.Document document = null;com.aspose.cells.v_9 v_9 = new com.aspose.cells.v_9();v_9.a(document); }");//这里会将这个创建的类对象编译为.class文件ctClass.writeFile("D:/");} catch (Exception e) {e.printStackTrace();}}
生成 v_9.class 文件
public static void main(String[] args) {try {ClassPool pool = ClassPool.getDefault();// jar文件路径pool.insertClassPath("D:/aspose-cells-23.6.jar");// 类名CtClass ctClass = pool.get("com.aspose.cells.v_9");// 方法名和参数CtMethod ctMethod = ctClass.getMethod("a", "(Ljava/lang/String;)I");ctMethod.setBody("{ return 1; }");// 方法名和参数ctMethod = ctClass.getMethod("a", "(Lorg/w3c/dom/Document;)V");ctMethod.setBody("{ com.aspose.cells.License.a = \"123\";a = this;com.aspose.cells.r98.a(); }");//这里会将这个创建的类对象编译为.class文件ctClass.writeFile("D:/");} catch (Exception e) {e.printStackTrace();}}
我这里使用的是,360压缩打开 -cells-23.6.jar 文件,将 .class和v_9.class 拖到对应的包路径下 。
删除 META-INF 目录下的 *.RSA 和 *.SF 签名文件
修改 *.MF 文件只保存如下:
【一、分析】
Manifest-Version: 1.0Application-Name: Aspose.Cells for javaImplementation-Title: Aspose.Cells for javaCopyright: Copyright 2001-2023 Aspose Pty LtdBundle-SymbolicName: com.aspose.cellsImplementation-Version: 23.6.0Release-Date: 2023-06-08Specification-Vendor: Aspose Pty LtdBundle-ManifestVersion: 2Specification-Title: Aspose.Cells for javaApplication-Library-Allowable-Codebase: *Bundle-Vendor: Aspose Pty LtdImport-Package: javax.xml.parsers,org.w3c.dom,org.xml.sax,javax.crypto;resolution:="optional",javax.crypto.spec;resolution:="optional",javax.security.cert;resolution:="optional",com.sun.image.codec.jpeg;resolution:="optional",javax.imageio;resolution:="optional",javax.imageio.metadata;resolution:="optional",javax.imageio.stream;resolution:="optional",com.sun.media.imageio.plugins.tiff;resolution:="optional",javax.media.jai;resolution:="optional",javax.print;resolution:="optional",javax.print.attribute;resolution:="optional",javax.print.attribute.standard;resolution:="optional",org.apache.tools.zip;resolution:="optional",org.bouncycastle.jce.provider;resolution:="optional"Implementation-Vendor: Aspose Pty LtdExport-Package: com.aspose.cellsMinimum-JDK: 1.6Bundle-Name: Aspose.Cells for javaBundle-Version: 23.6.0Caller-Allowable-Codebase: *Permissions: all-permissionsName: Aspose.Cells for javaSpecification-Version: 23.6.0Created-By: 1.8.0_172 (Oracle Corporation)
- 是什么使印度互联网行业独树一帜?
- 国际巧克力品牌排行榜 巧克力品牌排行榜前十名
- 鬼獒是什么
- 星球大战外传侠盗一号在哪儿在线观看
- 什么是龙血草
- HTML的命名空间什么意思,就是html标签内xmlns后面一个网址的那个_百
- c语言任意长度小数加减法,[c++]大数运算
- 遍插茱萸少一人的遍是什么意思
- 给老师写一封信怎么写
- html页面管理器,HTML5存储管理器多合一插件