Of course not. Whence the idea? Use local tools like
cutbase64 -d- jq
… to inspect token contents.
c/cybersecurity is a community centered on the cybersecurity and information security profession. You can come here to discuss news, post something interesting, or just chat with others.
THE RULES
Instance Rules
Community Rules
If you ask someone to hack your "friends" socials you're just going to get banned so don't do that.
Learn about hacking
Other security-related communities !databreaches@lemmy.zip !netsec@lemmy.world !securitynews@infosec.pub !cybersecurity@infosec.pub !pulse_of_truth@infosec.pub
Notable mention to !cybersecuritymemes@lemmy.world
Of course not. Whence the idea? Use local tools like
cutbase64 -dI know of these, but my company provided me a windows machine and very strict access rules, so no local tools for me. Can't even install them.. But I can run javascript, so I'll try that.
No. It’s just a dot separated array of base64 encoded strings. You don’t need any fancy debug
const jwt = "PASTE_JWT_HERE";
const [header, payload] = jwt.split(".");
const decode = (part) => JSON.parse(
new TextDecoder().decode(
Uint8Array.from(
atob(part.replace(/-/g, "+").replace(/_/g, "/")),
c => c.charCodeAt(0)
)
)
);
console.log("Header:", decode(header));
console.log("Payload:", decode(payload));
For just the payload on bash : echo "$TOKEN" | cut -d '.' -f2 | base64 --decode | jq -C . (the last pipe and jq command can be dropped if you don't have it installed)
Sassy.
base64 -d <<< "${TOKEN//./ }"