微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

用于解密 PDF 文件源代码的工具/命令?

如何解决用于解密 PDF 文件源代码的工具/命令?

我正在使用 qpdf 命令查看 PDF 文件的原始代码(源代码)。具体来说,我正在使用命令:

 qpdf  --qdf  original.pdf  unpacked.pdf

然而,许多 PDF 元数据在这个解压缩的文件中被加密,并且有很多无法打印的 ASCII 字符。我对一些实际加密的 pdf 文件数据感兴趣。假设我有 pdf 文件的密码(比如 pwd="passwd"),我怎样才能得到与 qpdf 命令输出类似的输出,但是数据在哪里被解密?

编辑:

链接中附有示例文件。请检查第 1841 - 3258 行。具体来说,在整个文件中,我无法找到 TransformParams 字典,尽管我添加了权限。我相信它可能在这个加密文本中。

链接

https://www.mediafire.com/file/b7rf383zxdevgmx/unpacked.txt/file

解决方法

正如在对该问题的评论中已经假设的那样,PDF file 根本没有加密。

请检查第 1841 - 3258 行

1841 - 3258 是从 1739 (OTTO...) 行到 3258 行的流的一部分,包含嵌入的 OpenType 字体,比较前面的流字典

57 0 obj
<<
  /Subtype /OpenType
  /Length 58 0 R
>>

以及引用它的字体描述符:

<<
  /Ascent 952
  /CapHeight 674
  /CharSet (/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/bullet/Euro/bullet/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE/bullet/Zcaron/bullet/bullet/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe/bullet/zcaron/Ydieresis/space/exclamdown/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis)
  /Descent -250
  /Flags 32
  /FontBBox [
    -157
    -250
    1126
    952
  ]
  /FontFamily (Myriad Pro)
  /FontFile3 57 0 R
  /FontName /MyriadPro-Regular
  /FontStretch /Normal
  /FontWeight 400
  /ItalicAngle 0
  /StemV 88
  /Type /FontDescriptor
  /XHeight 484
>>

特别是,在整个文件中,我无法找到 TransformParams 字典,尽管我添加了权限。

嗯,文件的共享版本既没有加密(所以不需要应用权限)也没有数字签名(所以特别是没有应用签名转换方法,所以没有 TransformParams在那里)。

也许您搜索的信息已通过使用 qpdf 解压缩 PDF 被删除,也许它们一开始并不存在。因此,您可能应该改为分析原始文件。或者您可能想更彻底地解释您的期望,也许其中存在错误。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。