@extends('layouts.app')
@section('title', \Illuminate\Support\Str::limit($analysis->title(), 60))
@php
$typeName = ['file' => 'File', 'url' => 'URL', 'domain' => 'Domain', 'ip' => 'IP address', 'hash' => 'File hash'][$analysis->type];
$v = $analysis->verdict;
$headline = match (true) {
$analysis->status === 'failed' => 'The scan could not finish',
! $analysis->isFinished() => 'Scanning now. This page updates by itself.',
$v === 'malicious' => 'Malicious: do not open or visit this',
$v === 'suspicious' => 'Suspicious: treat with caution',
$v === 'clean' => 'No engine flagged this '.strtolower($analysis->type === 'hash' ? 'file' : $typeName),
default => $analysis->type === 'hash' ? 'This hash is not known to any engine' : 'No engine could give a verdict',
};
$d = $analysis->details ?? [];
$tab = 'detection';
@endphp
@section('content')
@include('partials.ring', ['a' => $analysis])
{{ $headline }}
{{ $analysis->title() }}
- Type
- {{ $analysis->file_type ?? $typeName }}
@if ($analysis->type === 'file')
- Size
- {{ number_format($analysis->file_size) }} bytes
- SHA-256
- {{ $analysis->sha256 }}
@elseif ($analysis->type === 'url' && ! empty($d['http']['final_url']) && $d['http']['final_url'] !== $analysis->subject)
- Ends up at
- {{ $d['http']['final_url'] }}
@endif
- Scanned
- {{ $analysis->created_at->format('j M Y, H:i') }} ({{ $analysis->created_at->diffForHumans() }})
@if ($analysis->status === 'failed')
{{ $analysis->error }}
@endif
@if (! $analysis->isFinished())
Running engines… {{ $analysis->results()->count() }} finished so far.
@if (config('queue.default') !== 'sync')
If this never moves past "Queued", the queue worker isn't running on the server (see the README).
@endif
@else
@foreach ($analysis->results as $r)
{{ $r->engine }}@if($r->engine_version){{ $r->engine_version }}@endif
@include('partials.result-icon', ['cat' => $r->category])
{{ match ($r->category) {
'malicious', 'suspicious' => $r->result ?? ucfirst($r->category),
'harmless' => $r->result && $r->result !== 'clean' ? 'Clean ('.$r->result.')' : 'Clean',
'undetected' => 'Undetected',
'unsupported' => 'Not applicable'.($r->result ? ': '.$r->result : ''),
'timeout' => 'Timed out',
default => 'Unable to check'.($r->result ? ': '.$r->result : ''),
} }}
@php $reasons = collect($r->details['reasons'] ?? [])->where('score', '>', 0); @endphp
@if ($reasons->isNotEmpty() || ! empty($r->details['reference']) || ! empty($r->details['matches']))
Why
@foreach ($reasons as $why)- {{ $why['reason'] }} (+{{ $why['score'] }})
@endforeach
@if (! empty($r->details['matches']) && is_array($r->details['matches']))
@foreach ($r->details['matches'] as $m)- Rule {{ $m['rule'] }}@if(! empty($m['meta']['description'])): {{ $m['meta']['description'] }}@endif
@endforeach
@endif
@if (! empty($r->details['reference']))- Source record
@endif
@endif
@endforeach
@if ($analysis->results->isEmpty())
No engines are active for this kind of item. An admin can switch some on in the server settings.
@endif
@include('partials.details.'.($analysis->type === 'file' ? 'file' : ($analysis->type === 'hash' ? 'hash' : 'net')), ['d' => $d, 'a' => $analysis])
@endif
@endsection
@push('scripts')
@endpush
{{ $c->body }}