()
| 9450 | html += '<p class="text-xs uppercase text-gray-400 mt-2 mb-1">ICMP redirects (' + redirects.length + ')</p>' + |
| 9451 | '<table class="min-w-full text-xs text-gray-300 whitespace-nowrap"><thead>' + |
| 9452 | '<tr class="text-left text-gray-500"><th class="px-2 py-1">Source</th><th class="px-2 py-1">Told</th><th class="px-2 py-1">For destination</th><th class="px-2 py-1">Use next-hop</th><th class="px-2 py-1">Verdict</th></tr>' + |
| 9453 | '</thead><tbody>' + |
| 9454 | redirects.map(r => { |
| 9455 | const mal = r.malicious; |
| 9456 | return `<tr class="border-t border-slate-800"> |
| 9457 | <td class="px-2 py-1 font-mono ${mal ? 'text-red-300' : 'text-gray-200'}">${escapeHtml(r.src)}</td> |
| 9458 | <td class="px-2 py-1 font-mono text-gray-400">${escapeHtml(r.dst)}</td> |
| 9459 | <td class="px-2 py-1 font-mono text-gray-400">${escapeHtml(r.redirected || '—')}</td> |
| 9460 | <td class="px-2 py-1 font-mono ${mal ? 'text-red-300' : 'text-gray-400'}">${escapeHtml(r.new_gw || '—')}</td> |
| 9461 | <td class="px-2 py-1">${mal ? '<span class="text-red-300">MITM</span>' : '<span class="text-gray-500">benign</span>'}</td> |
| 9462 | </tr>`; |
| 9463 | }).join('') + '</tbody></table>'; |
| 9464 | } |
| 9465 | const rfindings = d.redirect_findings || []; |
| 9466 | if (rfindings.length) { |
| 9467 | const sevChip = { |
| 9468 | CRITICAL: 'bg-red-950/60 border-red-800 text-red-300', |
| 9469 | HIGH: 'bg-orange-950/50 border-orange-800 text-orange-300', |
| 9470 | MEDIUM: 'bg-amber-950/40 border-amber-800 text-amber-300', |
| 9471 | LOW: 'bg-slate-800 border-slate-700 text-gray-400', |
| 9472 | INFO: 'bg-slate-800 border-slate-700 text-gray-500', |
| 9473 | }; |
| 9474 | // The RFC 1122 / gateway-MAC / ARP-poison detail behind the verdict, |
| 9475 | // most-severe first. |
| 9476 | const rank = { INFO: 0, LOW: 1, MEDIUM: 2, HIGH: 3, CRITICAL: 4 }; |
| 9477 | const shown = rfindings.slice().sort((a, b) => (rank[b.severity] || 0) - (rank[a.severity] || 0)); |
nothing calls this directly
no outgoing calls
no test coverage detected