summaryrefslogtreecommitdiff
path: root/python/examples/pe_stat.py
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2022-01-27 22:43:28 -0500
committerKyleMiles <krm504@nyu.edu>2022-01-28 00:24:06 -0500
commit6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 (patch)
treedace4156d03148bcaf02df138ab4e0d93e61bc6f /python/examples/pe_stat.py
parent519c9db22367f2659d1a54599fab47e6313be06e (diff)
Format All Files
Diffstat (limited to 'python/examples/pe_stat.py')
-rwxr-xr-xpython/examples/pe_stat.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/examples/pe_stat.py b/python/examples/pe_stat.py
index f5a6d89f..2e3f7755 100755
--- a/python/examples/pe_stat.py
+++ b/python/examples/pe_stat.py
@@ -27,7 +27,7 @@ import sys
import binaryninja
from collections import defaultdict
-opc2count = defaultdict(lambda:0)
+opc2count = defaultdict(lambda: 0)
target = sys.argv[1]
print('opening %s' % target)
@@ -48,6 +48,5 @@ total = sum([x[1] for x in opc2count.items()])
print('op frequency %')
print('-- --------- -')
-for opc in sorted(opc2count.keys(), key=lambda x:opc2count[x], reverse=True):
- print(opc.ljust(8), str(opc2count[opc]).ljust(16), '%.1f%%'%(100.0*opc2count[opc]/total))
-
+for opc in sorted(opc2count.keys(), key=lambda x: opc2count[x], reverse=True):
+ print(opc.ljust(8), str(opc2count[opc]).ljust(16), '%.1f%%' % (100.0 * opc2count[opc] / total))