INNER CODE UNIT · JavaScript

printScan

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

async function printScan(scanId) {
  const job = scans[scanId];
  if(!job) return;
  // Open while the click still has user activation, before the download awaits.
  const win = openReportWindow();
  if(!win) return;
  let saved;
  try {
    saved = await fetchJson(`/api/scans/${encodeURIComponent(scanId)}/download`);
  } catch(e){
    win.close();
    toast('Could not load the scan report: ' + e.message, false);
    return;
  }
  if(win.closed) return;
  let html = `<!DOCTYPE html><html><head><title>Scan Report - ${esc(job.target)}</title>
  <style>
    body{font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; padding: 20px; color: #333; line-height: 1.5;}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…