Skip to content

Instantly share code, notes, and snippets.

@tuckner
Created March 1, 2019 17:36
Show Gist options
  • Save tuckner/212c6133dfa4948348bf50b11fe451cf to your computer and use it in GitHub Desktop.
Save tuckner/212c6133dfa4948348bf50b11fe451cf to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
s = 'eventdataxml'
l = re.findall('(?<=Name=")\w+', s)
p = ''
for i in l:
p += "'Data Name=\"{0}\">' {0} '<' * ".format(i)
full = """
Event
| where EventID == \"1\"
| parse EventData with * {0}
| search \"*\"
""".format(p)
print(full)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment