Skip to content

Commit

Permalink
Added fake entropy graph plot at offset 0 to ensure a full graph even…
Browse files Browse the repository at this point in the history
… if the entire file has high entropy
  • Loading branch information
devttys0 committed Oct 3, 2017
1 parent 526a979 commit 9f6e550
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/binwalk/modules/entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def plot_entropy(self, fname):
# Add a fake, invisible plot entry so that offsets at/near the
# minimum x value (0) are actually visible on the plot.
ax.plot(-(max(x)*.001), 1.1, lw=0)
ax.plot(-(max(x)*.001), 0, lw=0)

if self.show_legend and has_key(self.file_markers, fname):
for (offset, description) in self.file_markers[fname]:
Expand Down

0 comments on commit 9f6e550

Please sign in to comment.