PageSourceSearch

https://bluelanternsecurity.io/UrlThreatAnalyzer-DG8NBoQR.js

js bluelanternsecurity.io collected 2026-10-02 01:57:54 UTC 9,963 bytes, 1 lines download raw bytes

1import{i as _,l as ee,q as te,o as se,r as t,u as ae,a as re,j as e,P as oe,Q as ne,G as le,s as C,L as f,d as ie,E as ce,v as de,w as me}from"./index-C86sjUM7.js";import{T as xe}from"./ToolNavigation-BRVKy_Ic.js";import{F as he}from"./FreeTierScanMeter-4VpL8LJE.js";import{A as ue,L as pe}from"./AlternativeSubmissionMethods-HiFwwICy.js";import{p as fe,i as be,n as ye}from"./urlDetonation-Dm30FDJU.js";import{I as ge}from"./info-D5zhcT7u.js";import{S as je}from"./shield-alert-cz1iZj9B.js";import{L as Ne}from"./link-2-CKxS_3iO.js";import"./book-open-Caz2b750.js";import"./lock-CAeLtCCS.js";function Ie(){const{isAuthenticated:r,getValidToken:b}=_(),{refreshCreditBalance:O,seatLicensed:D}=ee(),{registerJob:F,registerJobByType:J}=te(),{refreshRuns:G}=se(),[H,L]=t.useState(!1),[M,R]=t.useState(!1),m=ae(),$=re(),c=typeof m.state?.prefilledUrl=="string"?m.state.prefilledUrl:"",q=m.state?.source||"",[S,y]=t.useState(c),[U,T]=t.useState(""),[x,A]=t.useState(!1),[B,g]=t.useState(!1),[h,k]=t.useState(null),[j,E]=t.useState(!1),[I,o]=t.useState(""),[d,N]=t.useState(""),[w,P]=t.useState(!0),[Q,V]=t.useState("Check pricing"),[K,v]=t.useState(!!c);t.useEffect(()=>{c&&(y(c),v(!0),$(m.pathname,{replace:!0,state:null}))},[c]),t.useEffect(()=>{if(!r){P(!1);return}(async()=>{try{const n=b(),u={"Content-Type":"application/json"};n&&(u.Authorization=`${n}`);const s=await fetch("https://api.bluelanternsecurity.io/tools",{method:"GET",headers:u});if(!s.ok)return;const l=await s.json(),i=fe(l).find(be);i?(N(i.id||""),V("Free")):N("")}catch(n){console.error("Failed to fetch URL detonation tool info",n),N("")}finally{P(!1)}})()},[r,b]);const Y=()=>{y(""),T(""),g(!1),k(null),E(!1),o(""),v(!1)},z=async()=>{o("");let a;try{a=ye(S)}catch(s){o(s.message);return}if(!r){R(!0);return}const n=b();if(!n){o("Authentication error. Please log in again.");return}if(!d){o("The URL Threat Analyzer is not available yet. Please refresh the Scan Now page and try again.");return}A(!0);const u={tool:d,checkCost:!1,url:a};try{const s=await fetch("https://api.bluelanternsecurity.io/runs",{method:"POST",headers:{Authorization:`${n}`,"Content-Type":"application/json"},body:JSON.stringify(u)}),l=await s.json();let p=l;if(l.body&&typeof l.body=="string")try{p=JSON.parse(l.body)}catch(Z){console.error("Failed to parse inner body",Z)}const{jobId:i,cached:W,accepted:X}=de(p);s.ok&&X?(i?(k(i),F(i,"URLDETONATIONENGINE",a)):J("URLDETONATIONENGINE",a),E(W),T(a),g(!0),L(!1),O(),G()):(L(s.status===429),o(me(s.status,p)))}catch(s){console.error("URL detonation API call failed:",s),o("Failed to submit the URL for analysis. Please try again later.")}finally{A(!1)}};return e.jsxs("div",{className:"tool-page min-h-screen bg-slate-950 text-white",children:[e.jsx(xe,{}),e.jsx(oe,{title:"URL threat analyzer | Phishing and malware URL analysis | Blue Lantern",description:"Safely detonate suspicious URLs in an isolated sandbox to surface phishing pages, redirects, and malicious behavior. Free scans to start, no subscription required.",path:"/url-analyzer"}),e.jsxs("div",{className:"tool-content relative max-w-5xl mx-auto px-4 pb-12 pt-24 sm:px-6 sm:pb-16 sm:pt-28",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-3xl sm:text-4xl font-semibold tracking-tight text-white mb-3",children:"URL Threat Analyzer"}),e.jsx("p",{className:"text-base text-slate-300 max-w-2xl mx-auto",children:"Analyze a URL for potential safety concerns, suspicious behavior, and phishing login pages."})]}),e.jsx("div",{className:"rounded-[14px] bg-slate-900/60 border border-slate-800/80 mb-8",children:e.jsxs("div",{className:"p-6 sm:p-8",children:[K&&e.jsxs("div",{className:"mb-4 flex items-start gap-2 rounded-md border border-cyan-400/30 bg-cyan-500/10 p-3 text-sm text-cyan-200",children:[e.jsx(ne,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-cyan-300"}),e.jsx("span",{children:q==="qr-scanner"?"Link pre-filled from QR URL Extractor. Review it and hit Submit for Analysis.":"Link pre-filled for you. Review it and hit Submit for Analysis."})]}),e.jsx("label",{htmlFor:"url",className:"block text-sm font-medium text-slate-300 mb-2",children:"URL to Analyze"}),e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(le,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-slate-500"}),e.jsx("input",{id:"url",type:"url",value:S,onChange:a=>{y(a.target.value),g(!1),o(""),v(!1)},onKeyDown:a=>{a.key==="Enter"&&!x&&z()},placeholder:"https://example.com/login",className:"w-full rounded-[10px] border border-slate-700/60 bg-slate-900/80 py-3 pl-12 pr-4 font-mono text-sm text-white placeholder-slate-500 transition-colors focus:border-cyan-400/50 focus:outline-none focus:ring-2 focus:ring-cyan-400/20"})]}),e.jsx("button",{onClick:z,disabled:x||r&&(w||!d),className:`rounded-md px-6 py-2.5 text-sm font-semibold transition-colors sm:min-w-[180px] ${x||r&&(w||!d)?"bg-slate-700 text-slate-400 cursor-not-allowed":"bg-cyan-500 text-slate-950 hover:bg-cyan-400"}`,children:x?e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-slate-400/40 border-t-slate-200 rounded-full animate-spin"}),"Submitting…"]}):r&&w?"Loading…":r&&!d?"Unavailable":"Submit for Analysis"})]}),I&&e.jsxs("div",{className:"mt-4 rounded-md border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-300",children:[e.jsx(C,{className:"mr-2 inline h-4 w-4"}),I]}),e.jsxs("div",{className:"mt-4 rounded-md border border-slate-800 bg-slate-950/50 p-4 text-sm text-slate-400",children:[e.jsx(C,{className:"mr-2 inline h-4 w-4 text-cyan-300"}),"Only submit URLs you are authorized to analyze. Results will appear on your ",e.jsx(f,{to:"/monitoring-hub",className:"text-cyan-300 hover:text-cyan-200",children:"Monitoring Hub"})," after processing."]}),e.jsx(he,{limitHit:H})]})}),B&&e.jsx("div",{className:"rounded-[14px] bg-slate-900/60 border border-emerald-500/30 p-6 sm:p-8 mb-8",children:e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[e.jsx("div",{className:"w-12 h-12 rounded-[10px] bg-emerald-500/15 ring-1 ring-emerald-400/40 flex items-center justify-center flex-shrink-0",children:e.jsx(ie,{className:"w-6 h-6 text-emerald-300"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:j?"Report ready":"Analysis 
1submitted"}),e.jsx("p",{className:"text-sm text-slate-300 mb-4",children:j?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-mono text-cyan-300 break-all",children:U})," has been analyzed before, so your report is ",e.jsx("span",{className:"text-white",children:"ready now"})," — no new scan (or charge) was needed."]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-mono text-cyan-300 break-all",children:U})," has been submitted for analysis. Results will be available on your ",e.jsx(f,{to:"/monitoring-hub",className:"text-cyan-300 hover:text-cyan-200",children:"Monitoring Hub"})," in approximately ",e.jsx("span",{className:"text-white",children:"30 seconds"}),"."]})}),h&&e.jsx("div",{className:"p-3 rounded-md bg-slate-900/80 border border-slate-800 mb-4",children:e.jsxs("p",{className:"text-sm text-slate-400",children:["Job ID: ",e.jsx("span",{className:"font-mono text-cyan-300",children:h})]})}),e.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row",children:[j&&h?e.jsx(f,{to:`/url-detonation-report/${h}`,className:"inline-flex items-center justify-center rounded-md bg-cyan-500 px-6 py-2 text-sm font-semibold text-slate-950 transition-colors hover:bg-cyan-400",children:"View Report Now"}):e.jsx(f,{to:"/monitoring-hub",className:"inline-flex items-center justify-center rounded-md bg-cyan-500 px-6 py-2 text-sm font-semibold text-slate-950 transition-colors hover:bg-cyan-400",children:"Go to Monitoring Hub"}),e.jsx("button",{onClick:Y,className:"rounded-md border border-slate-700 bg-slate-800/50 px-6 py-2 text-sm font-medium text-slate-200 transition-colors hover:border-slate-600 hover:bg-slate-800",children:"Analyze Another URL"})]})]})]})}),e.jsx("div",{className:"rounded-[14px] bg-slate-900/60 border border-slate-800/80 p-6 mb-8",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(ge,{className:"w-5 h-5 text-cyan-300 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-white mb-2",children:"How it works"}),e.jsxs("div",{className:"text-sm text-slate-300 space-y-2",children:[e.jsxs("p",{children:[e.jsxs("span",{className:"text-white font-medium",children:[e.jsx(ce,{className:"inline h-4 w-4 text-slate-400 mr-1"}),"Page rendering"]})," · loads the target URL in a controlled environment and captures a screenshot."]}),e.jsxs("p",{children:[e.jsxs("span",{className:"text-white font-medium",children:[e.jsx(je,{className:"inline h-4 w-4 text-slate-400 mr-1"}),"Phishing signals"]})," · looks for suspicious login experiences, deceptive page patterns, and safety concerns."]}),e.jsxs("p",{children:[e.jsxs("span",{className:"text-white font-medium",children:[e.jsx(Ne,{className:"inline h-4 w-4 text-slate-400 mr-1"}),"Redirect review"]})," · records URL behavior such as redirects and final landing pages."]}),e.jsx("p",{className:"mt-3 text-xs text-slate-500",children:D?"Included in your Seat License.":`Cost: ${Q} per analysis`})]})]})]})}),e.jsx(ue,{isAuthenticated:r,intro:"Prefer not to use the form? You can also submit URLs via API.",api:{endpoint:"https://api.bluelanternsecurity.io/runs",method:"POST",description:"Send a JSON body with the URL to detonate. Requires an API key from API Access.",body:{type:"json",json:{tool:"URLDETONATIONENGINE",checkCost:!1,url:"https://example.com/path"}},docsLink:{to:"/documentation/saas-tools/url-threat-analyzer",label:"URL Threat Analyzer docs"}}})]}),e.jsx(pe,{open:M,onClose:()=>R(!1),toolName:"URL Threat Analyzer"})]})}export{Ie 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.