166 lines
8.7 KiB
HTML
166 lines
8.7 KiB
HTML
<!-- app/templates/static_results.html -->
|
|
|
|
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="max-w-6xl mx-auto px-4 py-6">
|
|
<!-- Header -->
|
|
<div class="flex items-center justify-between mb-6">
|
|
<div>
|
|
<h1 class="text-xl font-medium text-gray-100">Analysis Summary</h1>
|
|
<p class="text-base text-gray-500 mb-6">Comprehensive overview of all scan results.</p>
|
|
</div>
|
|
<button onclick="window.location.href='/results/{{ file_info.md5 }}/info'"
|
|
class="px-4 py-2 bg-blue-500/10 text-blue-500 border border-blue-500 rounded-lg hover:bg-blue-500/20 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 transition-colors"
|
|
aria-label="Navigate back to file information">
|
|
Back to File Info
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Target Details -->
|
|
<div id="targetDetails" class="mb-6">
|
|
<div class="bg-gray-900/30 rounded-lg border border-gray-800 p-4 mb-4">
|
|
<h4 class="text-base font-medium text-gray-100 mb-2">Target File</h4>
|
|
<p class="text-gray-300">
|
|
<span class="font-semibold">File Path:</span>
|
|
{{ analysis_results.checkplz.findings.scan_results.file_path if analysis_results.checkplz else file_info.original_name }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Overall Status Grid -->
|
|
<div class="grid grid-cols-3 gap-4 mb-6">
|
|
<div class="bg-gray-900/30 rounded-lg border border-gray-800 p-4">
|
|
<div class="text-sm text-gray-500">Overall Status</div>
|
|
<div id="overallStatus" class="text-2xl font-semibold {{ 'text-red-500' if yara_detections or checkplz_detections else 'text-green-500' }}">
|
|
{{ 'Threats Detected' if yara_detections or checkplz_detections else 'Clean' }}
|
|
</div>
|
|
</div>
|
|
<div class="bg-gray-900/30 rounded-lg border border-gray-800 p-4">
|
|
<div class="text-sm text-gray-500">Total Detections</div>
|
|
<div id="totalDetections" class="text-2xl font-semibold text-gray-300">{{ yara_detections + checkplz_detections }}</div>
|
|
</div>
|
|
<div class="bg-gray-900/30 rounded-lg border border-gray-800 p-4">
|
|
<div class="text-sm text-gray-500">Scan Duration</div>
|
|
<div class="text-2xl font-semibold text-gray-300">
|
|
{{ scan_duration }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Scanner Results Table -->
|
|
<div class="bg-gray-900/30 rounded-lg border border-gray-800 overflow-hidden mb-6">
|
|
<table class="w-full">
|
|
<thead>
|
|
<tr class="border-b border-gray-800">
|
|
<th class="px-6 py-3 text-left text-base font-medium text-gray-300">Scanner</th>
|
|
<th class="px-6 py-3 text-left text-base font-medium text-gray-300">Status</th>
|
|
<th class="px-6 py-3 text-left text-base font-medium text-gray-300">Detections</th>
|
|
<th class="px-6 py-3 text-left text-base font-medium text-gray-300">Details</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="scannerResultsBody" class="divide-y divide-gray-800">
|
|
<!-- YARA Results Row -->
|
|
<tr>
|
|
<td class="px-6 py-4 text-base text-gray-300">YARA</td>
|
|
<td class="px-6 py-4">
|
|
<span class="px-2 py-1 text-base rounded {{ 'bg-red-500/10 text-red-500' if yara_detections else 'bg-green-500/10 text-green-500' }}">
|
|
{{ 'Suspicious' if yara_detections else 'Clean' }}
|
|
</span>
|
|
</td>
|
|
<td class="px-6 py-4 text-base {{ 'text-red-500' if yara_detections else 'text-gray-400' }}">{{ yara_detections }}</td>
|
|
<td class="px-6 py-4">
|
|
{% if yara_detections %}
|
|
<div class="text-base text-gray-400">
|
|
{% for match in analysis_results.yara.matches %}
|
|
<div class="mb-1">
|
|
Rule: <span class="text-red-400">{{ match.rule }}</span>
|
|
{% if match.metadata %}
|
|
(Severity: {{ match.metadata.severity }})
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<span class="text-base text-gray-400">No threats detected</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<!-- CheckPlz Results Row -->
|
|
<tr>
|
|
<td class="px-6 py-4 text-base text-gray-300">CheckPlz</td>
|
|
<td class="px-6 py-4">
|
|
<span class="px-2 py-1 text-base rounded {{ 'bg-red-500/10 text-red-500' if checkplz_detections else 'bg-green-500/10 text-green-500' }}">
|
|
{{ 'Suspicious' if checkplz_detections else 'Clean' }}
|
|
</span>
|
|
</td>
|
|
<td class="px-6 py-4 text-base {{ 'text-red-500' if checkplz_detections else 'text-gray-400' }}">{{ checkplz_detections }}</td>
|
|
<td class="px-6 py-4 text-base text-gray-400">
|
|
{{ analysis_results.checkplz.findings.initial_threat if checkplz_detections else 'No threats detected' }}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- String Analysis Results -->
|
|
<div class="bg-gray-900/30 rounded-lg border border-gray-800 p-6">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<h2 class="text-lg font-medium text-gray-100">String Analysis Results</h2>
|
|
<div class="text-sm text-gray-400">
|
|
Total Strings: {{ stringnalyzer_results.findings.total_strings if stringnalyzer_results.findings is defined else 0 }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Findings Table -->
|
|
<div class="space-y-4">
|
|
{% macro render_findings_row(title, items) %}
|
|
{% if items and items|length > 0 %}
|
|
<div class="border-t border-gray-800 py-4 first:border-0 first:pt-0">
|
|
<h3 class="text-base font-medium text-gray-300 mb-2">{{ title }} <span class="text-sm text-gray-500">({{ items|length }})</span></h3>
|
|
<div class="grid grid-cols-1 gap-2">
|
|
{% for item in items[:5] %}
|
|
<div class="text-sm text-gray-400 bg-gray-900/30 p-2 rounded">{{ item }}</div>
|
|
{% endfor %}
|
|
{% if items|length > 5 %}
|
|
<div class="text-sm text-gray-500">... and {{ items|length - 5 }} more items</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% set findings = stringnalyzer_results.findings if stringnalyzer_results.findings is defined else {} %}
|
|
|
|
<!-- Suspicious strings get special treatment -->
|
|
{% if findings.found_suspicious_strings and findings.found_suspicious_strings|length > 0 %}
|
|
<div class="bg-red-500/5 border border-red-900/20 rounded-lg p-4 mb-4">
|
|
<h3 class="text-base font-medium text-red-400 mb-2">
|
|
Suspicious Strings <span class="text-sm text-red-500/70">({{ findings.found_suspicious_strings|length }})</span>
|
|
</h3>
|
|
<div class="grid grid-cols-1 gap-2">
|
|
{% for item in findings.found_suspicious_strings[:5] %}
|
|
<div class="text-sm text-red-300 bg-red-500/10 p-2 rounded">{{ item }}</div>
|
|
{% endfor %}
|
|
{% if findings.found_suspicious_strings|length > 5 %}
|
|
<div class="text-sm text-red-400/70">... and {{ findings.found_suspicious_strings|length - 5 }} more suspicious items</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Regular findings -->
|
|
<div class="grid grid-cols-2 gap-4">
|
|
<div>
|
|
{{ render_findings_row('URLs Found', findings.found_url) }}
|
|
{{ render_findings_row('Paths Found', findings.found_path) }}
|
|
</div>
|
|
<div>
|
|
{{ render_findings_row('IP Addresses', findings.found_ip) }}
|
|
{{ render_findings_row('Files Referenced', findings.found_file) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |