File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323from datetime import datetime
2424from functools import partial
2525
26- import six
27-
2826
2927class memoize (object ):
3028 """cache the return value of a method
@@ -556,7 +554,7 @@ def unpack_guid(self, offset):
556554 raise OverrunBufferException (o , len (self ._buf ))
557555
558556 # Yeah, this is ugly
559- h = [six . indexbytes ( _bin , i ) for i in range (len (_bin ))]
557+ h = [_bin [ i ] for i in range (len (_bin ))]
560558 return """{:02x}{:02x}{:02x}{:02x}-{:02x}{:02x}-{:02x}{:02x}-{:02x}{:02x}-{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}""" .format (
561559 h [3 ], h [2 ], h [1 ], h [0 ],
562560 h [5 ], h [4 ],
Original file line number Diff line number Diff line change 2121import base64
2222import itertools
2323
24- import six
2524import hexdump
2625
2726from .BinaryParser import Block
@@ -1470,7 +1469,7 @@ def string(self):
14701469 ret = "0x"
14711470 b = self .hex ()[::- 1 ]
14721471 for i in range (len (b )):
1473- ret += '{:02x}' .format (six . indexbytes ( b , i ) )
1472+ ret += '{:02x}' .format (b [ i ] )
14741473 return ret
14751474
14761475
@@ -1490,7 +1489,7 @@ def string(self):
14901489 ret = "0x"
14911490 b = self .hex ()[::- 1 ]
14921491 for i in range (len (b )):
1493- ret += '{:02x}' .format (six . indexbytes ( b , i ) )
1492+ ret += '{:02x}' .format (b [ i ] )
14941493 return ret
14951494
14961495
Original file line number Diff line number Diff line change 2020import re
2121import xml .sax .saxutils
2222
23- import six
24-
2523import Evtx .Nodes as e_nodes
2624
2725
@@ -180,7 +178,7 @@ def rec(node, acc):
180178def render_root_node (root_node ):
181179 subs = []
182180 for sub in root_node .substitutions ():
183- if isinstance (sub , six . string_types ):
181+ if isinstance (sub , str ):
184182 raise RuntimeError ('string sub?' )
185183
186184 if sub is None :
Original file line number Diff line number Diff line change 44#
55# Purpose: User can dump evtx data into JSON format to either the command line or a JSON file in new line delimited format/JSON array.
66# Details: The JSON object is created with only the EventRecordID from the System section of the evtx XML and all of the information within the EventData section.
7+ #
8+ # Requires:
9+ # - xmltodict >= 0.12.0
10+ import os
11+ import json
12+
13+ import xmltodict
714
815import Evtx .Evtx as evtx
916import Evtx .Views as e_views
1017
11- # Added packages
12- import os
13- import xmltodict
14- import json
15-
1618
1719def main ():
1820 import argparse
Original file line number Diff line number Diff line change 2121 url = "https://github.com/williballenthin/python-evtx" ,
2222 license = "Apache 2.0 License" ,
2323 packages = setuptools .find_packages (),
24+ python_requires = '>=3.8' ,
2425 install_requires = [
25- 'six' ,
2626 'hexdump>=3.3' ,
27- 'xmltodict>=0.12.0' , #added deps for evtx_dump_json.py script
2827
29- # pin deps for python 2, see #67
3028 'more_itertools>=5.0.0' ,
3129 'zipp>=1.0.0' ,
3230 'pyparsing>=2.4.7' ,
3331 ],
3432 extras_require = {
35- # For running unit tests & coverage
3633 "test" : [
3734 'pytest-cov>=2.11.1' ,
3835 'pytest>=4.6.11' ,
You can’t perform that action at this time.
0 commit comments