Skip to content

Commit

Permalink
Renamed al_elf.json to features.json
Browse files Browse the repository at this point in the history
  • Loading branch information
gdesmar committed Jan 18, 2022
1 parent 55545eb commit b7e6d2f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions elf/elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def add_segments(self):
sub_res = ResultSection(f"Segment - {segment['type']}")
sub_res.add_line(f"Type: {segment['type']}")
sub_res.add_tag("file.elf.segments.type", segment["type"])
sub_res.add_line(f"Flags: {segment['flags']}")
if 'flags' in segment:
sub_res.add_line(f"Flags: {segment['flags']}")
sub_res.add_line(f"Physical Size: {segment['physical_size']}")
sub_res.add_line(f"Virtual Size: {segment['virtual_size']}")
if len(segment["sections"]):
Expand Down Expand Up @@ -170,7 +171,7 @@ def execute(self, request: ServiceRequest):
self.add_hash()
self.add_symbols_version()

temp_path = os.path.join(self.working_directory, "al_elf.json")
temp_path = os.path.join(self.working_directory, "features.json")
with open(temp_path, "w") as myfile:
myfile.write(json.dumps(self.elf.__dict__))
request.add_supplementary(temp_path, "al_elf.json", "Features extracted from the ELF file, as a JSON file")
request.add_supplementary(temp_path, "features.json", "Features extracted from the ELF file, as a JSON file")

0 comments on commit b7e6d2f

Please sign in to comment.