aspose.pdf-17.8暴力破解,附破解过程和使用代码。仅供参考,不可用于商业用途

在学习aspose这个插件的时候,发现java版本的pdf的资料真的很少,破解版也基本找不到,没得办法只能自己来。
使用到的工具可以参考我上一篇破解word的那个文章。
直入主题,首先我们通过JByteMod找到License.class
很不幸的是我这里打开看到的已经报错根本看不到源码。
在这里插入图片描述就很绝望,根本就看不到任何信息,但是我们不能放弃呀,艺高人胆大,直接调用jar包运行签名,看看到底是那个类确切实现了签名
在这里插入图片描述就抓到z123这个小可爱啦!!!
在这里插入图片描述打得开,很好,于是开始找到底是哪里开始验证的,找到m1这个验证方法,为什么确定他是呢?因为The signature is invalid这句话,验证无效就直接跳出了!!!(我也是靠猜的,哈哈哈哈哈)
在这里插入图片描述
于是跳过验证就好啦,此处用到javassist工具类(不清楚的可以看看破解word那个文章哦,这里就不多说啦)
在这里插入图片描述
然后替换z123.class这个类
在这里插入图片描述
到这里破解就结束啦,附上使用代码

public static void pdftoimag(String inPath, String outPath) {
		if (!getpdfLicense()) { // 验证License 若不验证则转化出的会有水印产生
			return;
		}
		try {
			com.aspose.pdf.Document doc1 = new com.aspose.pdf.Document(inPath); // inPath是将要被转化的文档
			for (int i = 1; i <= doc1.getPages().size(); i++) {
				String aa = "D://test//" + outPath + "_" + i + ".png";
				File file = new File(aa); // 新建一个文件
				FileOutputStream os;
				os = new FileOutputStream(file);
				com.aspose.pdf.devices.Resolution reso = new com.aspose.pdf.devices.Resolution(
						200);
				com.aspose.pdf.devices.JpegDevice jpegDevice = new com.aspose.pdf.devices.JpegDevice(
						reso, 100);
				jpegDevice.process(doc1.getPages().get_Item(i), os);
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

附上验证代码(签名可以随便写,因为跳过验证了,但是不写又不行,真是麻烦)

public static boolean getpdfLicense() {
	boolean result2 = false;
	try {
		String license2 = "<License>\n"
				+ "  <Data>\n"
				+ "    <Products>\n"
				+ "      <Product>Aspose.Total for Java</Product>\n"
				+ "      <Product>Aspose.Words for Java</Product>\n"
				+ "    </Products>\n"
				+ "    <EditionType>Enterprise</EditionType>\n"
				+ "    <SubscriptionExpiry>20991231</SubscriptionExpiry>\n"
				+ "    <LicenseExpiry>20991231</LicenseExpiry>\n"
				+ "    <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>\n"
				+ "  </Data>\n"
				+ "  <Signature>111</Signature>\n"
				+ "</License>";
		InputStream is2 = new ByteArrayInputStream(
				license2.getBytes("UTF-8"));
		com.aspose.pdf.License asposeLic2 = new com.aspose.pdf.License();
		asposeLic2.setLicense(is2);
		result2 = true;
	} catch (Exception e) {
		e.printStackTrace();
	}
	return result2;
}

附上结果:
在这里插入图片描述
pdf破解版:https://download.csdn.net/download/qq_42834405/11484648
word破解版:https://download.csdn.net/download/qq_42834405/11463812
此方法仅供学习,绝对绝对不能用于商业用途哦!!!发生任何纠纷与本人无关

  • 7
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 37
    评论
评论 37
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值