INNER CODE UNIT · JavaScript

scanHosts

GamehunterKaan/AutoPWN-Suite · modules/web_ui_static/app.js:170

  const scanHosts = (saved.hosts||[]).map(h=>({...h, vulns:h.vulns || (h.ports||[]).flatMap(p=>p.vulnerabilities||[]).concat(h.unmapped_vulnerabilities||[])}));
  if(scanHosts.length) {
    scanHosts.forEach(h => {
      html += `<h3>Host: ${esc(h.ip)}</h3>`;
      html += `<div class="meta"><p><strong>MAC:</strong> ${esc(h.mac || '—')} &nbsp;|&nbsp; <strong>OS:</strong> ${esc(h.os || '—')} &nbsp;|&nbsp; <strong>Vendor:</strong> ${esc(h.vendor || '—')}</p></div>`;
      if(h.ports && h.ports.length) {
        html += `<h4>Open Ports</h4><table><tr><th>Port</th><th>Service</th><th>Product</th><th>Version</th></tr>`;
        h.ports.forEach(p => {
          html += `<tr><td>${esc(p.protocol||'tcp')}/${esc(p.port)}</td><td>${esc(p.service || '')}</td><td>${esc(p.product || '')}</td><td>${esc(p.version || '')}</td></tr>`;
        });
        html += `</table>`;
      } else {
        html += `<p>No open ports found.</p>`;
      }
      const vulns = (h.vulns || []);
      if(vulns.length) {
        html += `<h4>Vulnerabilities</h4><table><tr><th>CVE</th><th>Severity</th><th>CVSS</th><th>Description</th></tr>`;
        vulns.forEach(v => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…