pdfalyzer 1.17.7__py3-none-any.whl → 1.17.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pdfalyzer might be problematic. Click here for more details.
- CHANGELOG.md +4 -1
- pdfalyzer/pdfalyzer.py +9 -3
- {pdfalyzer-1.17.7.dist-info → pdfalyzer-1.17.8.dist-info}/METADATA +1 -1
- {pdfalyzer-1.17.7.dist-info → pdfalyzer-1.17.8.dist-info}/RECORD +7 -7
- {pdfalyzer-1.17.7.dist-info → pdfalyzer-1.17.8.dist-info}/LICENSE +0 -0
- {pdfalyzer-1.17.7.dist-info → pdfalyzer-1.17.8.dist-info}/WHEEL +0 -0
- {pdfalyzer-1.17.7.dist-info → pdfalyzer-1.17.8.dist-info}/entry_points.txt +0 -0
CHANGELOG.md
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
# NEXT RELEASE
|
|
2
2
|
|
|
3
|
+
### 1.17.8
|
|
4
|
+
* Handle `AttributeError` in `FontInfo` extraction
|
|
5
|
+
|
|
3
6
|
### 1.17.7
|
|
4
|
-
* Bump `pypdf` to 6.1.3 (fixes [#31](https://github.com/michelcrypt4d4mus/pdfalyzer/issues/31), `PyMuPDF` to 1.26.5
|
|
7
|
+
* Bump `pypdf` to 6.1.3 (fixes [#31](https://github.com/michelcrypt4d4mus/pdfalyzer/issues/31)), `PyMuPDF` to 1.26.5
|
|
5
8
|
|
|
6
9
|
### 1.17.6
|
|
7
10
|
* Better handling for errors resulting from bugs in PyPDF
|
pdfalyzer/pdfalyzer.py
CHANGED
|
@@ -220,14 +220,20 @@ class Pdfalyzer:
|
|
|
220
220
|
def _extract_font_infos(self) -> None:
|
|
221
221
|
"""Extract information about fonts in the tree and place it in `self.font_infos`."""
|
|
222
222
|
for node in self.node_iterator():
|
|
223
|
-
if isinstance(node.obj, dict) and RESOURCES in node.obj:
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
if not (isinstance(node.obj, dict) and RESOURCES in node.obj):
|
|
224
|
+
continue
|
|
225
|
+
|
|
226
|
+
log.debug(f"Extracting fonts from node with '{RESOURCES}' key: {node}...")
|
|
227
|
+
known_font_ids = [fi.idnum for fi in self.font_infos]
|
|
226
228
|
|
|
229
|
+
try:
|
|
227
230
|
self.font_infos += [
|
|
228
231
|
fi for fi in FontInfo.extract_font_infos(node.obj)
|
|
229
232
|
if fi.idnum not in known_font_ids
|
|
230
233
|
]
|
|
234
|
+
except AttributeError as e:
|
|
235
|
+
console.print_exception()
|
|
236
|
+
log.error(f"Failed to extract font information from node: {node}")
|
|
231
237
|
|
|
232
238
|
def _build_or_find_node(self, relationship: IndirectObject, relationship_key: str) -> PdfTreeNode:
|
|
233
239
|
"""If node in self.nodes_encountered already then return it, otherwise build a node and store it."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pdfalyzer
|
|
3
|
-
Version: 1.17.
|
|
3
|
+
Version: 1.17.8
|
|
4
4
|
Summary: Analyze PDFs with colors (and YARA). Visualize a PDF's inner tree-like data structure, check it against a library of YARA rules, force decodes of suspicious font binaries, and more.
|
|
5
5
|
Home-page: https://github.com/michelcrypt4d4mus/pdfalyzer
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.pdfalyzer.example,sha256=sh_qkUBw4hfJia_Dx2wB-fsqJInhx2sSgA7WJz3MHYo,3917
|
|
2
|
-
CHANGELOG.md,sha256=
|
|
2
|
+
CHANGELOG.md,sha256=835QQX0K5tFUKqdmJt4WZGau7BM1G-moVl4Hk5pEFUo,13745
|
|
3
3
|
LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
4
4
|
pdfalyzer/__init__.py,sha256=3ylD-19PcG1bJ-rMa6ruP06QaM9Q1BitaMOA2ppugM8,6197
|
|
5
5
|
pdfalyzer/__main__.py,sha256=Ko_AoAyYMLIe_cmhiUSl6twheLZrGyT8aOSJ2CP7EZY,43
|
|
@@ -33,7 +33,7 @@ pdfalyzer/output/tables/font_summary_table.py,sha256=TyCwcvqn99LXTWnmtk6MBPdc_33
|
|
|
33
33
|
pdfalyzer/output/tables/pdf_node_rich_table.py,sha256=7G-FLb_EUP50kZmYCTbo8Q6taU4xKp2QIGNOnQtYbNg,5908
|
|
34
34
|
pdfalyzer/output/tables/stream_objects_table.py,sha256=PgQj8oTtW5_X8SMQb3FvCWDS-d4Zl6QiE44Qhiv7lTY,706
|
|
35
35
|
pdfalyzer/pdf_object_relationship.py,sha256=tOJTp73m82oNZJB7NxvTLv167kqthH8PRbVnev_4uEk,5291
|
|
36
|
-
pdfalyzer/pdfalyzer.py,sha256=
|
|
36
|
+
pdfalyzer/pdfalyzer.py,sha256=dVAibIly-oaxxz_9N6SOpPcjFtYl1qSCnakjJExRnI4,12919
|
|
37
37
|
pdfalyzer/util/adobe_strings.py,sha256=eF4K1RhhR_qgMBT58MzCxWkqQj17OWLCNmG3SjZ9BUs,5045
|
|
38
38
|
pdfalyzer/util/argument_parser.py,sha256=9ixQMEZz00IPK8xRxuS7DMrQgXIrqhB2ve5W8XTZ1S8,9732
|
|
39
39
|
pdfalyzer/util/cli_tools_argument_parser.py,sha256=HyZhztyrPtbvOswmG975M0tK5KPon37lV3fxVA0OwYo,6277
|
|
@@ -47,8 +47,8 @@ pdfalyzer/yara_rules/__init.py__,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
47
47
|
pdfalyzer/yara_rules/didier_stevens.yara,sha256=4XhqafU09xzYUP7LCygHHBXOpAXUblJf6Tkn37MUy0w,7253
|
|
48
48
|
pdfalyzer/yara_rules/lprat.static_file_analysis.yara,sha256=i0CwRH8pBx_QshKFTQtr1CP5n378EZelsF2FxMY2y5A,21859
|
|
49
49
|
pdfalyzer/yara_rules/pdf_malware.yara,sha256=jDqSTP5BQSi2I_1xZiFZdy68I4oVWDat2j08-qdfbto,91063
|
|
50
|
-
pdfalyzer-1.17.
|
|
51
|
-
pdfalyzer-1.17.
|
|
52
|
-
pdfalyzer-1.17.
|
|
53
|
-
pdfalyzer-1.17.
|
|
54
|
-
pdfalyzer-1.17.
|
|
50
|
+
pdfalyzer-1.17.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
51
|
+
pdfalyzer-1.17.8.dist-info/METADATA,sha256=snNH5O5jkxPDvmLfRK4JynheF8wEWbOEfL5x2-Cuf2I,27328
|
|
52
|
+
pdfalyzer-1.17.8.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
53
|
+
pdfalyzer-1.17.8.dist-info/entry_points.txt,sha256=5ve7Ydx0p33ZuQWol6wIFAPPUgQrEQoJkOy06mD5t9Y,237
|
|
54
|
+
pdfalyzer-1.17.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|