AttributeError: 'NullTypeNode' object has no attribute 'find_end_of_stream'
まだ誰も着手していません。
評価
調査の方向性
Start with the traceback in Evtx/Nodes.py, especially _children, children, and find_end_of_stream; the failure occurs while rendering a record through Evtx/Views.py. Reproduce with the reported Windows Server 2012 R2 EVTX file and the evtx_dump.py command, then trace why a NullTypeNode lacks find_end_of_stream. Done means the file parses without this AttributeError; the report does not name a test or provide the sample file.
索引モデルが issue の本文から書いたものです。
説明
Hi,
When attempting to parse an evtx file as gathered by a collector on a Win server 2012 R2 box ; I get the following errors:
./evtx_dump.py Archive-ForwardedEvents-2017-07-19-09-54-122.evtx
<?xml version="1.1" encoding="utf-8" standalone="yes" ?>
<Events>
Traceback (most recent call last):
File "./evtx_dump.py", line 46, in <module>
main()
File "./evtx_dump.py", line 41, in main
print(record.xml())
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Evtx.py", line 481, in xml
return e_views.evtx_record_xml_view(self)
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Views.py", line 204, in evtx_record_xml_view
return render_root_node(record.root())
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Views.py", line 182, in render_root_node
for sub in root_node.substitutions():
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/BinaryParser.py", line 64, in __call__
cache[key] = self.func(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Nodes.py", line 1001, in substitutions
ofs = self.tag_and_children_length()
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Nodes.py", line 962, in tag_and_children_length
for child in self.children():
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/BinaryParser.py", line 64, in __call__
cache[key] = self.func(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Nodes.py", line 952, in children
return self._children(end_tokens=[SYSTEM_TOKENS.EndOfStreamToken])
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Nodes.py", line 159, in _children
ofs += child.length()
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/BinaryParser.py", line 64, in __call__
cache[key] = self.func(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Nodes.py", line 177, in length
for child in self.children():
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/BinaryParser.py", line 64, in __call__
cache[key] = self.func(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Nodes.py", line 334, in children
SYSTEM_TOKENS.CloseEmptyElementToken])
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Nodes.py", line 162, in _children
if child.find_end_of_stream():
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/BinaryParser.py", line 64, in __call__
cache[key] = self.func(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/python_evtx-0.6.0-py2.7.egg/Evtx/Nodes.py", line 186, in find_end_of_stream
ret = child.find_end_of_stream()
AttributeError: 'NullTypeNode' object has no attribute 'find_end_of_stream'
running Python 2.7.9 on Debian 8. I installed the current version of python-evtx using the setup.py utility from the github download. Please let me know if you need any more details.
- 主要言語
- Python
- スター
- 785
- フォーク
- 170
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
williballenthin/python-evtx のほかの issue
-
Infinite loop in ChunkHeader._load_strings / _load_templates on a crafted chunk (cyclic next_offset)対応中かも @memx13 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
williballenthin/python-evtx#101 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
williballenthin/python-evtx#94 · コメント 2 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
williballenthin/python-evtx#85 · コメント 2 件 ·
williballenthin/python-evtx の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
btclib-org/btclib-wallet#587 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Judgment-Pack/judgment-pack-spec#275 ·
メンテナーはふだん 1 日以内に返信
-
ai-generated
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue priority: low size: XS
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
yeongseon/azure-functions-doctor-python#651 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Changaco/python-libarchive-c#146 ·