1import{z as Ae,i as Re,r as f,j as e,s as q,L as de,b as F,F as Le,A as Ee,d as pe,aH as Ue,G as Oe}from"./index-C86sjUM7.js";import{R as Te}from"./ReportEvidenceSection-Cpyz9tsY.js";import{n as $e,r as Fe,u as De,A as Ie,b as Ve,c as ze,e as He,f as Be}from"./AnalysisReportLayout-BbK8H_o-.js";import{u as Pe}from"./reportNavigation-B2CPzqI6.js";import{C as he}from"./camera-CEjqEhn_.js";import{I as Y}from"./info-D5zhcT7u.js";import{L as We}from"./link-2-CKxS_3iO.js";import{S as Je}from"./shield-CqlVQTLX.js";import"./runPresentation-DoqGxX4m.js";import"./download-BjVXJSVp.js";import"./shield-x-CWkSTwZs.js";import"./shield-alert-cz1iZj9B.js";import"./search-C0pTPwzI.js";const Me="inline-flex w-fit items-center gap-2 rounded-md border border-slate-700/60 bg-slate-800/50 px-4 py-2 text-sm font-medium text-slate-300 transition-colors hover:border-slate-600 hover:bg-slate-800 hover:text-white",Ke=6,qe=new Set(["network_log","networkLog","cookies","suspicious_network_log","suspiciousNetworkLog","suspicious_cookies","suspiciousCookies","suspicious_links","suspiciousLinks","page_history","pageHistory","domain"]),Ye={total_links:"Links on Page",totalLinks:"Links on Page",cookie_checks:"Suspicious cookies",cookieChecks:"Suspicious cookies"},Ge={cookiechecks:"suspicious-cookies",cookie:"suspicious-cookies",cookies:"suspicious-cookies",suspiciouscookies:"suspicious-cookies",pagehistory:"page-navigation",history:"page-navigation",redirects:"page-navigation",historylength:"page-navigation",backbuttonpossiblehijack:"page-navigation",isvalidfinalurl:"page-navigation",finalurl:"page-navigation",totallinks:"suspicious-links",suspiciouslinks:"suspicious-links",links:"suspicious-links",networklog:"suspicious-network",suspiciousnetworklog:"suspicious-network",networkrequests:"suspicious-network",requests:"suspicious-network",domain:"domain-analysis",domaininfo:"domain-analysis",domainfindings:"domain-analysis",domainage:"domain-analysis",domainagedays:"domain-analysis",registrar:"domain-analysis",clickfixinstructionsdetected:"detail-clickfix",clipboardwriteattempted:"detail-clipboard_events",haspopups:"detail-popups",downloadexists:"detail-download_file_name"},me={clickfix:"ClickFix is a social-engineering lure: the page tells the visitor to press Win+R or open a terminal and paste a command it has already copied to their clipboard, usually disguised as a human-verification or fix-an-error step. Instruction matches are the step phrases found in the rendered page text; the lure is the verification element the sandbox clicked to trigger them.",clipboard_events:"The page wrote to the clipboard without the visitor copying anything. Command indicators flag payloads that look like shell or PowerShell commands, the delivery half of a ClickFix attack.",popups:"Windows the page opened on its own. Unexpected popups are used for fake alerts, forced logins, and ad fraud.",download_file_name:"The page started a file download the visitor did not ask for, a common malware delivery path.",external_domains:"Third-party domains the page loaded resources from. Unfamiliar ones are worth a look, especially on a login page."},Xe={httponly:"Without HttpOnly, JavaScript on the page can read this cookie via document.cookie. An XSS vulnerability could allow an attacker to steal it.",secure:"Without Secure, this cookie is sent over plain HTTP connections and can be intercepted on unsecured networks.",samesite:"Without a SameSite restriction, this cookie may be sent with cross-site requests, which can enable CSRF attacks."};function Q(s){if(s?.isBase64Encoded&&typeof s.body=="string")return s;if(s?.body&&typeof s.body=="string")try{return JSON.parse(s.body)}catch{return s}return s}function Ze(s){const r=Q(s);return r?.result?r.result:r}function Qe(s,r){return r.split(".").reduce((i,a)=>{if(i!=null)return i[a]},s)}function j(s,r,i=void 0){for(const a of r){const o=Qe(s,a);if(o!=null&&o!=="")return o}return i}function R(s=""){return String(s).replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase()).replace(/\b(Url|Ssl|Http|Https)\b/g,r=>r.toUpperCase()).replace(/\bClickfix\b/g,"ClickFix")}function m(s){return s==null||s===""?"Not reported":Array.isArray(s)?s.length===0?"N
1one reported":s.map(r=>m(r)).join(", "):typeof s=="object"?JSON.stringify(s):typeof s=="boolean"?s?"Yes":"No":String(s)}function T(s){return s?Array.isArray(s)?s:typeof s=="object"?Object.entries(s).map(([r,i])=>({key:r,value:i})):[s]:[]}function es(s){return/^https?:\/\//i.test(String(s||""))}function u(s){return s&&typeof s=="object"&&!Array.isArray(s)}function ee(s){return s==null||s===""||s===!1?!0:Array.isArray(s)?s.length===0:typeof s=="object"?Object.values(s).every(ee):!1}function ss(s){let r=m(s);if(Array.isArray(s))r=s.length?`${s.length} item${s.length===1?"":"s"}`:"None reported";else if(u(s)){const i=Object.keys(s).length;r=i===0||Object.values(s).every(ee)?"No results":`${i} field${i===1?"":"s"}`}return{label:r,className:"border-slate-600/40 bg-slate-800/30 text-slate-300"}}function ts(s,r="text-sm text-slate-300"){return es(s)?e.jsx("span",{className:`${r} text-white break-all`,children:s}):e.jsx("span",{className:r,children:m(s)})}function G(s,r){return s<=r?null:e.jsxs("p",{className:"mt-2 text-xs text-slate-500",children:["Showing ",r," of ",s,". Download the CSV for the full result set."]})}function X(s,r="value",i=Ke){if(Array.isArray(s)){if(s.length===0)return e.jsx("p",{className:"text-sm text-slate-500 italic",children:"None reported"});const a=s.slice(0,i);return s.every(o=>!u(o)&&!Array.isArray(o))?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:a.map((o,p)=>e.jsx("span",{className:"rounded bg-slate-800 px-2 py-1 text-xs text-slate-300",children:m(o)},`${r}-${p}`))}),G(s.length,a.length)]}):e.jsxs("div",{className:"space-y-3",children:[a.map((o,p)=>e.jsx("div",{className:"rounded-lg border border-slate-800 bg-slate-950/50 p-3",children:X(o,`${r}-${p}`,Math.max(3,Math.floor(i/2)))},`${r}-${p}`)),G(s.length,a.length)]})}if(u(s)){const a=Object.entries(s);if(a.length===0)return e.jsx("p",{className:"text-sm text-slate-500 italic",children:"No fields reported"});const o=a.slice(0,i);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:o.map(([p,g])=>e.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/50 p-3",children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500",children:R(p)}),e.jsx("div",{className:"mt-1 break-all",children:X(g,`${r}-${p}`,Math.max(3,Math.floor(i/2)))})]},`${r}-${p}`))}),G(a.length,o.length)]})}return ts(s,"text-sm text-slate-300 break-all")}function as(s){return(Array.isArray(s)?s:u(s)?Object.entries(s).map(([i,a])=>({[i]:a})):[]).flatMap((i,a)=>{if(!u(i))return[{name:`Cookie ${a+1}`,checks:{value:i}}];if(i.name&&Object.keys(i).some(o=>["httpOnly","secure","sameSite"].includes(o))){const{name:o,...p}=i;return[{name:o,checks:p}]}return Object.entries(i).map(([o,p])=>({name:o,checks:u(p)?p:{value:p}}))})}function rs(s){const r=as(s),i=[],a={};let o=0,p=0;return r.forEach(({name:g,checks:L})=>{const N=[];Object.entries(L).forEach(([k,v])=>{const E=String(v??"").toLowerCase();E==="pass"?o+=1:E==="fail"&&(p+=1,N.push(k),a[k]=(a[k]||0)+1)}),N.length>0&&i.push({name:g,failedAttributes:N})}),{entries:r,failedCookies:i,attributeFailures:a,passCount:o,failCount:p}}function ns(s){try{return new URL(s).hostname}catch{return""}}function is(s){const r={},i={},a=new Set;let o=0,p=0;return s.forEach(g=>{if(!u(g))return;const L=g.method||"Unknown",N=g.status??"Unknown",k=Number(N);i[L]=(i[L]||0)+1,r[N]=(r[N]||0)+1,Number.isFinite(k)&&(k>=300&&k<400&&(o+=1),k>=400&&(p+=1));const v=ns(g.url);v&&a.add(v)}),{statusCounts:r,methodCounts:i,hostnames:Array.from(a),redirectCount:o,errorCount:p}}function os(s){return typeof s=="string"&&s.length>120&&/^[A-Za-z0-9+/=\s]+$/.test(s)}function D(s){if(!s)return"";if(typeof s=="string"){const a=s.trim();if(a.startsWith("data:image/")||a.startsWith("http")||a.startsWith("blob:"))return a;if(a.startsWith("{"))try{return D(JSON.parse(a))}catch{return""}return os(a)?`data:image/png;base64,${a.replace(/\s/g,"")}`:""}if(s.isBase64Encoded&&typeof s.body=="string")return`data:${s.headers?.["content-type"]||s.headers?.["Content-Type"]||"image/png"};base64,${s.body}`;const r=Q(s);if(r!==s)return D(r);const i=["screenshot","screenshot_url","screenshotUrl","screenshot_base64","screenshotBase64","image","image_url","imageUrl","image_base64","imageBase64","presigned_url","presignedUrl","png","data","body","result"];for(const a of i)if(s[a]){const o=D(s[a]);if(o)return o}return""}function Z(s,r,i="Report",a=""){if(r!=null){if(Array.isArray(r)){if(r.every(o=>o===null||typeof o!="object")){s.push([i,a||"Values",r.join("; ")]);return}r.forEach((o,p)=>{Z(s,o,i,`${a||"Item"} ${p+1}`)}
1);return}if(typeof r=="object"){Object.entries(r).forEach(([o,p])=>{const g=a?`${a}.${o}`:o;Z(s,p,i,g)});return}s.push([i,a||"Value",r])}}function ls(s){return s.map(r=>r.map(i=>`"${String(i??"").replace(/"/g,'""')}"`).join(",")).join(` 2`)}function ws(){const{jobId:s}=Ae(),r=Pe(),{getValidToken:i}=Re(),[a,o]=f.useState(null),[p,g]=f.useState(""),[L,N]=f.useState(!1),[k,v]=f.useState(""),[E,ue]=f.useState(""),[xe,I]=f.useState(!0),[se,te]=f.useState(null),[V,ge]=f.useState(!1),[fe,ae]=f.useState(new Set),[be,ye]=f.useState(null);f.useEffect(()=>()=>{E&&URL.revokeObjectURL(E)},[E]),f.useEffect(()=>{let t=!1,n;const l=async c=>{N(!0),v("");try{const d=await fetch("https://api.bluelanternsecurity.io/results",{method:"POST",headers:{Authorization:`${c}`,"Content-Type":"application/json",Accept:"image/png"},body:JSON.stringify({jobId:s,fetchScreenshot:!0})});if(!d.ok)throw new Error("Screenshot unavailable");if((d.headers.get("Content-Type")||d.headers.get("content-type")||"").startsWith("image/")){const O=await d.blob();if(t)return;const K=URL.createObjectURL(O);ue(ce=>(ce&&URL.revokeObjectURL(ce),K)),g(K);return}const b=await d.text();let _;try{_=JSON.parse(b)}catch{_=b}const y=D(_);t||(y?g(y):v("Screenshot was not included in the result payload."))}catch(d){console.error("Error fetching URL detonation screenshot:",d),t||v("Screenshot unavailable.")}finally{t||N(!1)}},h=async()=>{const c=i();if(!c){te("Authentication required"),I(!1);return}try{const d=await fetch("https://api.bluelanternsecurity.io/results",{method:"POST",headers:{Authorization:`${c}`,"Content-Type":"application/json"},body:JSON.stringify({jobId:s})}),C=await d.text();let b;try{b=JSON.parse(C)}catch{throw new Error("Failed to parse JSON response")}if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);const _=Q(b),y=Ze(_),O=String(y?.status||_?.status||"").toLowerCase();if(O==="running"||O==="queued"||O==="pending"){n=window.setTimeout(h,2e3);return}if(!y||typeof y!="object")throw new Error("Report data unavailable");t||(o(y),I(!1),l(c))}catch(d){console.error("Error fetching URL detonation report:",d),t||(te(d.message||"Failed to load report"),I(!1))}};return h(),()=>{t=!0,n&&window.clearTimeout(n)}},[s,i]),f.useEffect(()=>{let t=!1;const n=i();if(n)return fetch(`https://api.bluelanternsecurity.io/runs/${s}`,{method:"GET",headers:{Authorization:`${n}`,"Content-Type":"application/json"}}).then(l=>l.ok?l.json():null).then(l=>{if(t||!l)return;let h=l;if(l?.body&&typeof l.body=="string")try{h=JSON.parse(l.body)}catch{h=l}let c=h?.result??h;Array.isArray(c)&&(c=c[0]);const d=c?.run_end||c?.RUN_END||c?.run_start||c?.RUN_START;d&&ye(d)}).catch(()=>{}),()=>{t=!0}},[s,i]);const je=()=>{if(!a)return;const t=[["Section","Field","Value"]];Z(t,a,"URL Analysis");const n=ls(t),l=new Blob([n],{type:"text/csv"}),h=window.URL.createObjectURL(l),c=document.createElement("a");c.href=h,c.download=`url_threat_analysis_report_${s}.csv`,document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(h)};if(xe)return e.jsx("div",{className:"min-h-screen bg-slate-950 text-white flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 border-4 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"}),e.jsx("p",{className:"text-lg text-slate-300",children:"Loading URL analysis report..."}),e.jsx("p",{className:"text-sm text-slate-500 mt-2",children:"This may take a moment if the analysis is still running"})]})});if(se||!a)return e.jsx("div",{className:"min-h-screen bg-slate-950 text-white flex flex-col items-center justify-center p-8",children:e.jsxs("div",{className:"text-center max-w-2xl w-full",children:[e.jsx(q,{className:"w-16 h-16 text-yellow-400 mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold mb-2",children:se||"Report Not Found"}),e.jsxs(de,{to:r.to,className:`${Me} mb-8`,children:["â ",r.label]})]})});const Ne=u(a.checks)?a.checks:{},re=u(a.details)?a.details:{},ke=Object.entries(Ne),ne=Object.entries(re),z=ne.filter(([t])=>!qe.has(t)),H=j(a,["url","target_url","targetUrl","submitted_url","submittedUrl","details.initial_url","details.initialUrl","input.url","request.url"],"Unknown URL"),we=j(a,["final_url","finalUrl","landing_url","landingUrl","resolved_url","resolvedUrl","details.final_url","details.finalUrl"]),ve=j(a,["analyzed_at","analyzedAt","completed_at","completedAt","timestamp"])||be,$=T(j(a,["details.suspicious_network_log","details.suspiciousNetworkLog","network_requests","networkRequests","details.network_log","details.networkLog","requests","page.requests"],[])),U=T(j(a,["details.suspicious_cookies","details.suspiciousCookies","cookies","details.cookies"],[])),B=T(j(a,["cookie_checks","cookieChecks","checks.cookie_checks","checks.cookieChecks"],[])),P=T(j(a,["details.suspicious_links","details.suspiciousLinks"],[])),W=T(j(a,["details.page_history","details.pageHistory"],[])),J=j(a,["details.history_length","details.historyLength"]),ie=T(j(a,["technologies","page.technologies"],[])),x=rs(B),M=is($),Se=ne.length-z.length,S=j(a,["details.domain.domain_info","details.domainInfo","domain_info","domainInfo"]),w=j(a,["details.domain.findings","details.domainFindings","domain_findings","domainFindings"]),Ce=x.failedCookies?.length>0?"bg-amber-500":U.length||B.length?"bg-emerald-500":"bg-cyan-500",_e=(Array.isArray(w)?w.length>0:!!w)?"bg-amber-500":"bg-emerald-500",oe=t=>{const n=document.getElementById(t)?t:"result-details";n.startsWith("detail-")&&ae(l=>new Set(l).add(n.slice(7))),Be(n)},le=ke.map(([t,n])=>
2{const l=$e(t),h=l==="cookiechecks",c=Ge[l]||"result-details",d=c.startsWith("detail-")?c.slice(7):null,C={"suspicious-cookies":x.failedCookies.length?x.failedCookies:U,"suspicious-links":P,"suspicious-network":$,"page-navigation":W,"domain-analysis":w},b=d?re[d]:C[c];return{id:t,label:Ye[t]||R(t),target:c,tone:h?x.failedCookies.length?"warn":"info":De(t,n),value:h?x.failedCookies.length?x.failedCookies.length+" missing security flags":x.entries.length+" checked":Fe(n),description:me[d]||"Review the reported result alongside the captured page and related evidence.",evidence:b!==void 0&&!(Array.isArray(b)&&!b.length)?b:{[R(t)]:n}}}),A=(t,n,l,h,c,d=null)=>e.jsx(Te,{id:d||t.toLowerCase().replaceAll(" ","-"),title:t,description:n,Icon:l.type,tone:h==="bg-red-500"?"danger":h==="bg-amber-500"?"warning":"neutral",children:c});return e.jsx("div",{className:"analysis-report-page min-h-screen bg-slate-950 text-white",children:e.jsxs("div",{className:"relative max-w-6xl mx-auto px-4 pb-12 pt-24 sm:px-6 sm:pb-16 sm:pt-28",children:[e.jsx(Ie,{kind:"URL",backLink:r,analyzedAt:ve,jobId:s,onDownload:je,analyzeTo:"/url-analyzer"}),e.jsxs("div",{className:"email-message-details analysis-target",children:[e.jsx("p",{className:"email-data-label",children:"Target URL"}),e.jsx("p",{className:V?"email-data-value break-all":"email-data-value truncate",title:H,children:H}),H.length>100&&e.jsx("button",{type:"button","aria-expanded":V,onClick:()=>ge(t=>!t),children:V?"Show less":"Show full URL"})]}),e.jsx("div",{className:"mb-7",children:e.jsx(Ve,{kind:"URL",determination:a.determination??a.result?.determination,totalChecks:a.total_checks??a.result?.total_checks,failedChecks:a.number_failed_checks??a.result?.number_failed_checks})}),e.jsx(ze,{checks:le,onInspect:oe}),e.jsxs("div",{id:"analysis-evidence",className:"email-evidence-title analysis-scroll-target",children:[e.jsx("h2",{children:"Supporting evidence"}),e.jsx("p",{children:"Explore the captured page, browser behavior, and domain details."})]}),A("Browser behavior","Observed browser behavior and detailed results from the sandbox.",e.jsx(Le,{className:"w-6 h-6 text-cyan-200"}),"bg-cyan-500",z.length>0?e.jsxs("div",{className:"space-y-4",children:[Se>0&&e.jsx("div",{className:"rounded-lg border border-slate-800/80 bg-slate-950/50 p-4 text-sm text-slate-400",children:"Large network and cookie datasets are summarized below. The full nested results are available in the CSV download."}),e.jsx("div",{className:"divide-y divide-slate-800/50",children:z.map(([t,n])=>{const l=ss(n),h=!ee(n),c=h&&(Array.isArray(n)||u(n)),d=h?me[t]:null,C=!fe.has(t),b=()=>ae(_=>{const y=new Set(_);return y.has(t)?y.delete(t):y.add(t),y});return e.jsxs("div",{id:`detail-${t}`,className:"scroll-mt-24",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-medium text-white",children:R(t)}),d&&e.jsx("p",{className:"mt-1 max-w-xl text-xs leading-relaxed text-slate-400",children:d})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[(Array.isArray(n)||u(n))&&e.jsx("span",{className:`inline-flex rounded-md border px-2.5 py-1 text-xs font-normal ${l.className}`,children:l.label}),c&&e.jsx("button",{onClick:b,"aria-label":`Details for ${R(t)}`,"aria-expanded":!C,className:"rounded p-1 text-slate-400 hover:bg-slate-700/50 hover:text-white transition-colors",children:e.jsx(F,{className:`w-4 h-4 transition-transform ${C?"-rotate-90":""}`})}),!c&&!Array.isArray(n)&&!u(n)&&e.jsx("span",{className:"text-sm text-slate-300 break-all text-right max-w-xs",children:m(n)})]})]}),c&&!C&&e.jsx("div",{className:"border-t border-slate-800/50 bg-slate-950/30 px-4 py-3",children:X(n,`detail-${t}`,Array.isArray(n)?n.length:void 0)})]},t)})})]}):e.jsx("div",{className:"p-4 rounded-lg bg-slate-900/50 border border-slate-800/80",children:e.jsx("p",{className:"text-sm text-slate-400",children:"No concise detail fields were included in this report payload. Download the CSV for the full results."})}),"result-details"),A("Rendered page","Screenshot and landing page details captured in the sandbox",e.jsx(he,{className:"w-6 h-6 text-cyan-200"}),"bg-cyan-500",e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-xl border border-slate-800/80 bg-slate-900/50 p-4",children:L?e.jsx("div",{className:"flex h-72 items-center justify-center text-slate-400",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mx-auto mb-3 h-10 w-10 rounded-full border-4 border-cyan-500/30 border-t-cyan-500 animate-spin"}),"Loading screenshot..."]})}):p?e.jsx("img",{src:p,alt:"URL analysis screenshot",className:"w-full rounded-lg border border-slate-800 bg-slate-950 object-contain"}):e.jsx("div",{className:"flex h-72 items-center justify-center rounded-lg border border-dashed border-slate-700 bg-slate-950/50 text-center text-slate-500",children:e.jsxs("div",{children:[e.jsx(he,{className:"mx-auto mb-3 h-10 w-10"}),e.jsx("p",{children:k||"No screenshot returned for this run."})]})})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-slate-800/80 bg-slate-900/50 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500",children:"Final URL"}),e.jsx("p",{className:"mt-1 text-sm font-mono text-slate-300 break-all",children:m(we)})]}),ie.length>0&&e.jsxs("div",{className:"rounded-lg border border-slate-800/80 bg-slate-900/50 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500",children:"Technologies"}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:ie.map((t,n)=>e.jsx("span",{className:"rounded bg-slate-800 px-2 py-1 text-xs text-slate-300",children:m(t)},n))})]})]})]})),W.length>0&&A("Page navigation",`Full redirect chain observed during detonation${Number.isFinite(Number(J))?` (${J} hop${Number(J)===1?"":"s"})`:""}`,e.jsx(Ee,{className:"w-6 h-6 text-cyan-200"}),"bg-cyan-500",e.jsx("ol",{className:"space-y-2",children:W.map((t,n)=>e.jsxs("li",{className:"flex items-start gap-3 rounded-lg border border-slate-800/80 bg-slate-900/50 px-4 py-3",children:[e.jsx("span",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-cyan-500/20 text-xs font-semibold text-cyan-300",children:n+1}),e.jsx("span",{className:"font-mono text-xs text-white break-all",children:m(t)})]},n))}),"page-navigation"),P.length>0&&A("Suspicious Links","Links on the page that pointed to external domains with suspicious patterns",e.jsx(We,{className:"w-6 h-6 text-cyan-200"}),"bg-red-500",e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex gap-2 rounded-lg border border-slate-700/40 bg-slate-900/40 px-4 py-3 text-xs text-slate-400",children:[e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-slate-500"}),e.jsxs("div",{children:[e.jsx("p",{children:"Internal links, blank hrefs, and common external domains are filtered out. Flagged for:"}),e.jsxs("ul",{className:"mt-1.5 list-disc space-y-0.5 pl-4",children:[e.jsx("li",{children:"JavaScript in href"}),e.jsx("li",{children:"Data URIs"}),e.jsx("li",{children:"Encoded hrefs"}),e.jsx("li",{children:"Direct downloads"}),e.jsx("li",{children:"Credential or billing patterns"})]})]})]}),P.map((t,n)=>{const l=u(t)?t.url||t.href:t,h=u(t)&&Array.isArray(t.suspicion_reasons)?t.suspicion_reasons:[];return e.jsxs("div",{className:"rounded-lg border border-red-500/20 bg-red-500/5 px-4 py-3",children:[e.jsx("p",{className:"font-mono text-xs text-white break-all",children:m(l)}),h.length>0&&e.jsx("ul",{className:"mt-2 space-y-1",children:h.map((c,d)=>e.jsxs("li",{className:"flex items-start gap-1.5 text-xs text-red-300",children:[e.jsx(q,{className:"mt-0.5 h-3 w-3 shrink-0"}),e.jsx("span",{className:"break-all",children:m(c)})]},d))})]},n)})]}),"suspicious-links"),A("Suspicious network requests","Requests to external domains that matched suspicious patterns",e.jsx(Ue,{className:"w-6 h-6 text-cyan-200"}),"bg-cyan-500",$.length?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2 rounded-lg border border-slate-700/40 bg-slate-900/40 px-4 py-3 text-xs text-slate-400",children:[e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-slate-500"}),e.jsxs("div",{children:[e.jsx("p",{children:"Requests to the target's own domain and common benign third parties are filtered out. Flagged for:"}),e.jsxs("ul",{className:"mt-1.5 list-disc space-y-0.5 pl-4",children:[e.jsx("li",{children:"Known crypto or credential-harvesting domains"}),e.jsx("li",{children:"POSTs to external hosts"}),e.jsx("li",{children:"Obfuscated payloads"}),e.jsx("li",{children:"Bare-IP endpoints"}),e.jsx("li",{children:"Possible data stuffing"})]})]})]}),e.jsx("div",{className:"space-y-2",children:$.map((t,n)=>{const l=Array.isArray(t?.suspicion_reasons)?t.suspicion_reasons:[];return e.jsxs("div",{className:"rounded-lg border border-slate-800/80 bg-slate-900/50 px-4 py-3",children:[e.jsx("p",{className:"font-mono text-xs text-white break-all",children:m(t?.url)}),e.jsxs("p",{className:"mt-1 text-xs text-slate-500",children:[m(t?.method)," ",m(t?.status),t?.headers?.["content-type"]?` - ${t.headers["content-type"]}`:""]}),l.length>0&&e.jsx("ul",{className:"mt-2 space-y-1",children:l.map((h,c)=>e.jsxs("li",{className:"flex items-start gap-1.5 text-xs text-amber-300",children:[e.jsx(q,{className:"mt-0.5 h-3 w-3 shrink-0"}),e.jsx("span",{className:"break-all",children:m(h)})]},c))})]},n)})}),e.jsxs("details",{className:"group rounded-lg border border-slate-800/80 bg-slate-900/50",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between px-4 py-3 text-sm font-medium text-slate-300 hover:text-white",children:["Status and host breakdown",e.
2jsx(F,{className:"w-4 h-4 transition-transform group-open:rotate-180"})]}),e.jsxs("div",{className:"space-y-4 border-t border-slate-800/50 px-4 py-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-2 text-xs uppercase tracking-wider text-slate-500",children:"Status Codes"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(M.statusCounts).map(([t,n])=>e.jsxs("span",{className:"rounded bg-slate-800 px-2 py-1 text-xs text-slate-300",children:[t,": ",n]},t))})]}),e.jsxs("div",{children:[e.jsxs("p",{className:"mb-2 text-xs uppercase tracking-wider text-slate-500",children:["Hosts (",M.hostnames.length,")"]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:M.hostnames.map(t=>e.jsx("span",{className:"rounded bg-slate-800 px-2 py-1 text-xs text-slate-300",children:t},t))})]})]})]})]}):e.jsx("div",{className:"p-4 rounded-lg bg-green-500/10 border border-green-500/20",children:e.jsxs("p",{className:"text-green-400 font-semibold flex items-center gap-2",children:[e.jsx(pe,{className:"w-4 h-4"})," No suspicious network requests were reported"]})}),"suspicious-network"),A("Suspicious cookies","Cookies from external domains flagged as suspicious, plus any failed security attribute checks",e.jsx(Oe,{className:"w-6 h-6 text-cyan-200"}),Ce,U.length||B.length?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2 rounded-lg border border-slate-700/40 bg-slate-900/40 px-4 py-3 text-xs text-slate-400",children:[e.jsx(Y,{className:"mt-0.5 h-4 w-4 shrink-0 text-slate-500"}),e.jsxs("div",{children:[e.jsx("p",{children:"Standard session cookies are filtered out. Flagged for:"}),e.jsxs("ul",{className:"mt-1.5 list-disc space-y-0.5 pl-4",children:[e.jsx("li",{children:"Values that encode extra data"}),e.jsx("li",{children:"Sensitive cookies missing HttpOnly, Secure, or SameSite"}),e.jsx("li",{children:"Possible embedded JWTs in non-session cookies"})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-6 px-1",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500",children:"Cookies"}),e.jsx("p",{className:"mt-0.5 text-2xl font-bold text-white",children:x.entries.length})]}),Object.entries(x.attributeFailures).map(([t,n])=>{const l=Xe[t.replace(/[_-]/g,"").toLowerCase()],h=x.entries.length,c=h-n;return e.jsxs("div",{className:"relative group",children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500 cursor-help",children:R(t)}),e.jsxs("p",{className:"mt-0.5 text-sm text-slate-300",children:[e.jsx("span",{className:"font-semibold text-white",children:c}),e.jsxs("span",{className:"text-slate-500",children:[" ","/ ",h," have flag"]})]}),l&&e.jsx("div",{className:"pointer-events-none absolute bottom-full left-0 z-10 mb-2 w-60 rounded-lg border border-slate-700 bg-slate-800 p-3 text-xs text-slate-300 opacity-0 shadow-xl transition-opacity group-hover:opacity-100",children:l})]},t)})]}),x.failedCookies.length>0&&e.jsxs("details",{className:"group rounded-lg border border-slate-800/80 bg-slate-900/50",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between px-4 py-3 text-sm font-medium text-slate-300 hover:text-white",children:[e.jsxs("span",{children:[x.failedCookies.length," cookie",x.failedCookies.length===1?"":"s"," ","missing at least one security flag"]}),e.jsx(F,{className:"w-4 h-4 transition-transform group-open:rotate-180"})]}),e.jsx("div",{className:"divide-y divide-slate-800/50 border-t border-slate-800/50",children:x.failedCookies.map(t=>e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-mono text-sm text-white break-all",children:t.name}),e.jsxs("p",{className:"mt-1 text-xs text-slate-400",children:["Missing:"," ",t.failedAttributes.map(R).join(", ")]})]},t.name))})]}),U.length>0&&e.jsxs("details",{className:"group rounded-lg border border-slate-800/80 bg-slate-900/50",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between px-4 py-3 text-sm font-medium text-slate-300 hover:text-white",children:[e.jsxs("span",{children:["All cookies (",U.length,")"]}),e.jsx(F,{className:"w-4 h-4 transition-transform group-open:rotate-180"})]}),e.jsx("div",{className:"divide-y divide-slate-800/50 border-t border-slate-800/50",children:U.map((t,n)=>e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-mono text-sm text-white break-all",children:u(t)?m(t.name||t.key||`Cookie ${n+1}`):m(t)}),u(t)&&e.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-1.5 text-xs text-slate-400",children:[t.domain&&e.jsxs("span",{className:"rounded bg-slate-800 px-2 py-0.5",children:["Domain: ",t.domain]}),t.path&&e.jsxs("span",{className:"rounded bg-slate-800 px-2 py-0.5",children:["Path: ",t.path]}),t.httpOnly!==void 0&&e.jsxs("span",{className:"rounded bg-slate-800 px-2 py-0.5",children:["HttpOnly: ",m(t.httpOnly)]}),t.secure!==void 0&&e.jsxs("span",{className:"rounded bg-slate-800 px-2 py-0.5",children:["Secure: ",m(t.secure)]}),t.sameSite&&e.jsxs("span",{className:"rounded bg-slate-800 px-2 py-0.5",children:["SameSite: ",t.sameSite]})]})]},n))})]})]}):e.jsx("div",{className:"p-4 rounded-lg bg-green-500/10 border border-green-500/20",children:e.jsxs("p",{className:"text-green-400 font-semibold flex items-center gap-2",children:[e.jsx(pe,{className:"w-4 h-4"})," No suspicious cookies were reported"]})}),"suspicious-cookies"),(S||w)&&A("Domain analysis","Registration and reputation details for the target domain",e.jsx(Je,{className:"w-6 h-6 text-cyan-200"}),_e,e.jsxs("div",{className:"divide-y divide-slate-800/50",children:[S&&[{label:"Domain",key:"domain"},{label:"Root Domain",key:"root_domain"},{label:"Age (days)",key:"age_days"},{label:"Creation Date",key:"creation_date"},{label:"Expiration Date",key:"expiration_date"},{label:"Registrar",key:"registrar"},{label:"Available",key:"available"},{label:"Suspicious Patterns",key:"suspicious_patterns"}].filter(({key:n})=>S[n]!==void 0&&S[n]!==null&&S[n]!=="").map(({label:n,key:l})=>e.jsxs("div",{className:"flex items-start justify-between gap-4 px-4 py-3",children:[e.jsx("p",{className:"text-sm font-medium text-slate-400 shrink-0 w-40",children:n}),e.jsx("p",{className:"text-sm text-slate-200 break-all text-right",children:Array.isArray(S[l])?S[l].join(", "):String(S[l])})]},l)),w&&e.jsxs("div",{className:"flex items-start justify-between gap-4 px-4 py-3",children:[e.jsx("p",{className:"text-sm font-medium text-slate-400 shrink-0 w-40",children:"Findings"}),e.jsx("p",{className:"text-sm text-slate-200 break-all text-right",children:Array.isArray(w)?w.join(", "):String(w)})]})]}),"domain-analysis"),e.jsx(He,{checks:le,onInspect:oe}),e.jsxs("footer",{className:"email-report-footer",children:[e.jsxs(de,{to:r.to,children:["â ",r.label]}),e.jsxs("span",{children:["Report ",s]})]})]})})}export{ws as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.