Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions BitsParser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/python3
# Copyright 2021 FireEye, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
Expand Down Expand Up @@ -330,7 +331,7 @@ def output_jobs(self, file_path, jobs):
# If an output file is specified, open it and use it instead of stdout
if self.out_file:
orig_stdout = sys.stdout
sys.stdout = open(self.out_file, "w")
sys.stdout = open(self.out_file, "a")

try:
for job in jobs:
Expand Down Expand Up @@ -551,7 +552,7 @@ def parse(self):
self.job_dict[alias] = self.escape(self.job_dict[alias])

# Update the object hash
if type(v) is not 'Dict':
if not isinstance(v, dict):
job_hash.update(str(v).encode('utf-8'))

self.hash = job_hash.hexdigest()
Expand Down
3 changes: 2 additions & 1 deletion ese/ese.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,8 @@ def openTable(self, tableName):
cursor['CurrentTag'] = 0

# Create a mapping of the long values tree
cursor['LongValues'] = self.__getLongValues(cursor['TableData']['LongValues']['FatherDataPageNumber'])
if 'FatherDataPageNumber' in cursor['TableData']['LongValues']:
cursor['LongValues'] = self.__getLongValues(cursor['TableData']['LongValues']['FatherDataPageNumber'])

return cursor

Expand Down