Skip to content

Wrap XML attributes in <pre>#2327

Merged
berggren merged 5 commits intogoogle:masterfrom
marcobrotto:xml_viewer_v2
Sep 21, 2022
Merged

Wrap XML attributes in <pre>#2327
berggren merged 5 commits intogoogle:masterfrom
marcobrotto:xml_viewer_v2

Conversation

@marcobrotto
Copy link
Contributor

@marcobrotto marcobrotto commented Sep 13, 2022

XML Viewer for xml_string attribute (second version with PRE HTML tag)

Plaso can parse WINEVTX logs. It creates an attribute xml_string that is the "dump" of the log itself. The next figure shows how it is represented in Timesketch.

image

This valuable information might be hard to interpret since it is written in a compat format. With this PR we aim to create an icon to visualize better this attribute.

Frontend files modified:

  1. EventDetail.vue: added the icon (</>) for the attribute xml_string

Screenshot 2022-09-13 1 42 24 PM

  1. [NEW!] FormatXMLString.vue: new component to display the XML string. It receives as input (~ property) the xml_string of the event's attribute xml_string. It outputs a formatted version of xml_string

image

Areas of improvements

We add the xml button to view the XML only when the attribute in the timeline event is equal to xml_string. This assumption works fine for the majority of the winevtx file parsed with Plaso. We could add the same button for whatever attribute that contains some XML.

Differences with the previous PR #2325

In this PR the component FormatXMLString embeds the xml_string into a pre tag. The code is very short and it could be ported into EventDetail.vue. We left it in a separate file because the component could have more feature and capabilities in the future.

@marcobrotto marcobrotto requested review from berggren and jaegeral and removed request for berggren September 13, 2022 13:40
@berggren berggren changed the title Xml viewer v2 Wrap XML attributes in <pre> Sep 15, 2022
Copy link
Contributor

@berggren berggren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@berggren berggren merged commit 8fd6713 into google:master Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants