-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvision.js
More file actions
1 lines (1 loc) · 2.22 KB
/
vision.js
File metadata and controls
1 lines (1 loc) · 2.22 KB
1
const parseCookie=e=>e.split(";").map((e=>e.split("="))).reduce(((e,t)=>(e[decodeURIComponent(t[0].trim())]=decodeURIComponent(t[1].trim()),e)),{}),prettifyCookies=()=>{const e=document.cookie.split(";").map((e=>e.split("="))).reduce(((e,t)=>(e[decodeURIComponent(t[0].trim())]=decodeURIComponent(t[1].trim()),e)),{});var t="";return Object.keys(e).forEach((n=>{t+=`<div style="margin-bottom:4px;">[+] <b style="color:#00ff58;">${n}</b>: ${e[n]}</div>`})),t};function parseHttpHeaders(e){return e.split("\n").map((e=>e.split(/: */,2))).filter((e=>e[0])).reduce(((e,t)=>(e[t[0]]=t[1],e)),{})}const getHeaders=()=>{var t=new XMLHttpRequest;return e.open("GET",document.location,!1),e.send(null),parseHttpHeaders(e.getAllResponseHeaders())};function capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}const getHeadersString=()=>{const e=((t=new XMLHttpRequest).open("GET",document.location,!1),t.send(null),parseHttpHeaders(t.getAllResponseHeaders()));var t;let n="";const o=["server","x-powered-by","content-security-policy","strict-transport-security","cross-origin-opener-policy","referrer-policy","permissions-policy"];return Object.keys(e).forEach((t=>{o.includes(t.toLowerCase())&&(n+=`<div style="margin-bottom:4px;">[+] <b style="color:#00ff58;">${capitalizeFirstLetter(t)}</b>: ${e[t]}</div>`)})),n};document.body.innerHTML+=`\n<div style="direction: ltr;position: fixed;top: 0;left: 0;right: 0;bottom: 0;height: 100%;z-index: 100;background: rgba(21, 13, 13, 0.9);border: 1px solid #aaa;box-shadow: 0px 0px 14px #000;display: flex;justify-content: center;text-align: left;align-items: center;\n"\n>\n\n<div style="max-width: 700px; background: rgba(0, 0, 0, 0.9); max-height: 800px; color: #fff; padding: 16px; font-size: 16px; overflow-x: auto; border-radius: 16px;"><h1 style="text-align: center; font-size: 22px; color: #00ffff; font-weight: bold; background: #262626; border-radius: 10px;">Wation Security Vision</h1><div style="font-size: 18px; color: #00ffff;"><b>Headers:</b></div><div style="margin-bottom: 16px;">${getHeadersString()}</div><hr /><div style="font-size: 18px; color: #00ffff;"><b>Cookies:</b></div><div style="margin-bottom: 16px;">${prettifyCookies()}</div><div style="text-align:center;">WSV V1.0</div>\n</div>\n</div>\n`;