帝王谷资源网 Design By www.wdxyy.com
背景:
一朋友在中学教学,前一阵子在家上网课没有电子版教材,网上找了半天也没有找到高清的或者没有水印的。好不容易找到了一个PDF版的还有密码,跑密码跑了一阵子也没动静。想必位数不低。。。。。
第一次解密PDF,用到这个思路,记录一下。
(站规及版权原因仅提供思路,不提供成品)
(站规及版权原因仅提供思路,不提供成品)
(站规及版权原因仅提供思路,不提供成品)
用到的工具:
dnSpy.exe
PDF Password Remover
核心模块代码
[C#] 纯文本查看 复制代码
这思路也是没谁了。。。。。。
发贴不易,给个小手手,发贴不易,给个小手手,发贴不易,给个小手手吧
一朋友在中学教学,前一阵子在家上网课没有电子版教材,网上找了半天也没有找到高清的或者没有水印的。好不容易找到了一个PDF版的还有密码,跑密码跑了一阵子也没动静。想必位数不低。。。。。
第一次解密PDF,用到这个思路,记录一下。
(站规及版权原因仅提供思路,不提供成品)
(站规及版权原因仅提供思路,不提供成品)
(站规及版权原因仅提供思路,不提供成品)
用到的工具:
dnSpy.exe
PDF Password Remover
核心模块代码
[C#] 纯文本查看 复制代码
// pep.sdk.reader.View.Textbook.BaseBookReader// Token: 0x06000750 RID: 1872 RVA: 0x00031A40 File Offset: 0x0002FC40private bool OpenPDF(string strPDFFile, string strBookID, string encrpytionType){if (!File.Exists(strPDFFile)){LogHelper.Instance.Error("下载的教材文件不存在,教材路径:" + strPDFFile);return false;}EncryptorHelper encryptorHelper = new EncryptorHelper();if (encrpytionType == "00") {:301_1001:}[color=#ff0000]数据库中教材全部为01,话说数据库的密码也是很长一串密钥,在此不再展开讲述,过程也不难,[/color]{string textBookPwd = encryptorHelper.GetTextBookPwd(strBookID);{:301_994:}[color=#ff0000]添加一句Environment.FailFast(textBookPwd);[/color][color=#ff0000][/color][color=#ff0000]不知为何,用LogHelper.Instance.Error()是不会记录到log中的。其他都可以。[/color]return this.ucReader.OpenFile(strPDFFile, textBookPwd);}if (!(encrpytionType == "01")){return false;}bool flag = false;byte[] array = null;try{array = encryptorHelper.FileDecrypt(strPDFFile);flag = this.ucReader.OpenBuffer(array, array.Length, "");if (!flag){LogHelper.Instance.Error("[color=#ff0000]教材解密到内存数组成功[/color],调用mSDK.OpenBuffer()返回false,打开教材失败!"); {:301_995:}[color=#ff00][/color][color=#ff00]此处是第一次见内存存PDF文件,尝试写出失败[/color]}return flag;}catch (Exception ex){LogHelper.Instance.Error("教材解密到内存数组失败!" + ex.ToString());string dataFolderPath = PepPathHelper.GetDataFolderPath("01", strBookID);string text = Path.Combine(dataFolderPath, strBookID);if (!Directory.Exists(dataFolderPath)){Directory.CreateDirectory(dataFolderPath);}if (File.Exists(text)){File.Delete(text);}if (array != null){using (FileStream fileStream = new FileStream(text, FileMode.CreateNew)){fileStream.Write(array, 0, array.Length);goto IL_11E;}}encryptorHelper.FileDecrypt(strPDFFile, text);IL_11E:flag = this.ucReader.OpenFile(text, "");if (!flag){LogHelper.Instance.Error(string.Format("教材打开失败,mSDK.OpenFile(strFile, \"\")返回false。教材路径:" + text + "。", new object[0]));}else{string text2 = "pep" + DateTime.Now.ToString(SdkConstants.DATE_TIME_FORMATE1);if (this.ucReader.SetUserPassword(text2)){this.ucReader.Save();flag = this.ucReader.OpenFile(text, text2);}}}this.mTextbookCore.pdfPagingControl.PageReader = this.ucReader;return flag;}
这思路也是没谁了。。。。。。
发贴不易,给个小手手,发贴不易,给个小手手,发贴不易,给个小手手吧
帝王谷资源网 Design By www.wdxyy.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
帝王谷资源网 Design By www.wdxyy.com
暂无评论...
更新日志
2024年10月28日
2024年10月28日
- 群星2013-青春缤纷辑压箱宝大公开3CD2[新加坡限量版][WAV整轨]
- 林育群.2013-BalladShow(日本版)【环球】【WAV+CUE】
- 陈加洛.1992-痛到感觉不到【宝丽金】【WAV+CUE】
- 群星.2023-宿命之敌电视剧原声带【韶愔音乐】【FLAC分轨】
- 東京事変-大発見[FLAC+CUE]
- 椎名林檎-三文ゴシップ[FLAC+CUE]
- 2024年08月04日
- 裘德《裘德「最后的水族馆」演唱会LIVE》[320K/MP3][228.89MB]
- 裘德《裘德「最后的水族馆」演唱会LIVE》[24bit 48kHz][FLAC/分轨][2.08G]
- 基因三重奏《如果你什么都不说 音乐会现场录音》[320K/MP3][145.37MB]
- 孟庭苇.1996-月亮说话(2020环球24KGOLD限量版)【上华】【WAV+CUE】
- 群星.1997-新艺宝优质音响系列·国语精选监听版【新艺宝】【WAV+CUE】
- 阿桑.2005-寂寞在唱歌(星外星引进版)【华研国际】【WAV+CUE】
- 基因三重奏《如果你什么都不说 音乐会现场录音》[FLAC/分轨][287.43MB]
- 蔡题谦《我爱你,却依然要看你走》[320K/MP3][88.65MB]