diff --git a/standalone/Kinginyourcastle.py b/standalone/Kinginyourcastle.py index 10eb7df..f59b8ae 100644 --- a/standalone/Kinginyourcastle.py +++ b/standalone/Kinginyourcastle.py @@ -445,9 +445,9 @@ def check_pe_header(filepath): if float(secEntropies[0]) > 6.7 or float(secEntropies[0]) < 6.0: eval = eval + 50 - epSecIndex = epSection.split('|')[1] + epSecIndex = int(epSection.split('|')[1]) # max. 6 secEntropies available - if epSecIndex <=6: + if epSecIndex < len(secEntropies) and secEntropies[epSecIndex]: if float(secEntropies[epSecIndex]) > 6.7 or float(secEntropies[epSecIndex]) < 6.0: eval = eval + 60