Skip to content

Commit f310633

Browse files
authored
fix: Correct Jinja2 template iteration and updating dictsort usage. (kevoreilly#2912)
1 parent f7ef79d commit f310633

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

data/html/generic/_office.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h4>Malicious Macro Bot Results</h4>
1010
<col width="250" />
1111
<col width="*" />
1212
</colgroup>
13-
{% for key, value in file.mmbot.items|dictsort:0 %}
13+
{% for key, value in file.mmbot|dictsort %}
1414
<tr>
1515
<td>{{key}}</td>
1616
<td>{{value}}</td>
@@ -30,7 +30,7 @@ <h4>SummaryInformation Metadata</h4>
3030
<col width="250" />
3131
<col width="*" />
3232
</colgroup>
33-
{% for key, value in file.office.Metadata.SummaryInformation.items|dictsort:0 %}
33+
{% for key, value in file.office.Metadata.SummaryInformation|dictsort %}
3434
<tr>
3535
<td>{{key}}</td>
3636
<td>{{value}}</td>
@@ -50,7 +50,7 @@ <h4>DocumentSummaryInformation Metadata</h4>
5050
<col width="250" />
5151
<col width="*" />
5252
</colgroup>
53-
{% for key, value in file.office.Metadata.DocumentSummaryInformation.items|dictsort:0 %}
53+
{% for key, value in file.office.Metadata.DocumentSummaryInformation|dictsort %}
5454
<tr>
5555
<td>{{key}}</td>
5656
<td>{{value}}</td>
@@ -124,7 +124,7 @@ <h4>Extracted Macros</h4>
124124
<div id="si_metadata">
125125
<h4>RTF document details</h4>
126126
<table class="table table-striped table-bordered">
127-
{% for key, value in file.office_rtf.items %}
127+
{% for key, value in file.office_rtf.items() %}
128128
<h5>Object ID: {{key}}</h5>
129129
<tr>
130130
<th width=10%>Filename</th>

data/html/generic/_pdf.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ <h4>Keyword Counts</h4>
101101
<th>Keyword</th>
102102
<th>Count</th>
103103
</tr>
104-
{% for keyword, count in file.pdf.Keywords.items %}
104+
{% for keyword, count in file.pdf.Keywords.items() %}
105105
<tr>
106106
<td>{{keyword}}</td>
107107
<td>{{count}}</td>

data/html/sections/_mitre.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h4>MITRE ATT&CK</h4>
1414
</thead>
1515
<tbody>
1616
<tr>
17-
{% for category, ttps in results.mitre_attck.items %}
17+
{% for category, ttps in results.mitre_attck.items() %}
1818
<td>
1919
<ul style="padding-left: 1rem">
2020
{% for ttp in ttps %}

data/html/sections/_summary.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ <h5 class="mb-0 text-white"><i class="fas fa-list-alt me-2 text-primary"></i> Su
173173
</tr>
174174
</thead>
175175
<tbody>
176-
{% for key, value in results.reversinglabs.items %}
176+
{% for key, value in results.reversinglabs.items() %}
177177
<tr>
178178
<td>{{key}}</td>
179179
{% if key == "permalink" %}

0 commit comments

Comments
 (0)