3 ms·
I found those in the inspector, sure. But I can't find them in the base64 encoded header. Edit: Nevermind. I tried like 10 different online base64 decoders bef
by d12bb 4y ago
I found those in the inspector, sure. But I can't find them in the base64 encoded header.
Edit: Nevermind. I tried like 10 different online base64 decoders before, till I found one wich didn't show just garbage (maybe they all hiccup on the emojis?), but even that one didn't decode properly as it seems. Either the eleventh one now told me the whole truth, or I should've used curl -i from the start instead of copy/pasting from Firefox's developer tools.
- AlexGuo1998 4y ago> ... instead of copy/pasting from Firefox's developer tools. You may toggle the "raw" switch in the upper-right corner, or Firefox will trim the header like "jh6…W5n".
- Symbiote 4y agocurl -SsI https://danq.me/wp-content/no-code-webpage/ | \ grep -i ^link: | \ cut -d, -f2 | cut -d\> -f1 | \ base64 -d The Base64 encoding is invalid, or at least not ideal, as the '==' padding has been removed [1]. Restoring it works: (curl -SsI https://danq.me/wp-content/no-code-webpage/ | \ grep -i ^link: | \ cut -d, -f2 | cut -d\> -f1; echo '==') | \ base64 -d [1] https://gist.github.com/Dan-Q/fc308a8a4aca2934312939f92eaa9d2e#file-_no_code_page_-php-L10 https://gist.github.com/Dan-Q/fc308a8a4aca2934312939f92eaa9d...
- javajosh 4y agoFYI browsers have built in functions for decoding base64, btoa() and atob(). Although I can never remember which is which.
- codetrotter 4y agoGuessing from the names: btoa() should be base64 to ascii atob() should be ascii to base64 Edit: it’s other way around, lolwut. https://developer.mozilla.org/en-US/docs/Web/API/atob https://developer.mozilla.org/en-US/docs/Web/API/atob
- javajosh 4y agoNo-one uses these often, and you have a 50% of guessing right every time!
- codetrotter 4y agoThis other page has some more details > The btoa() method creates a Base64-encoded ASCII string from a binary string (i.e., a string in which each character in the string is treated as a byte of binary data). https://developer.mozilla.org/en-US/docs/Web/API/btoa https://developer.mozilla.org/en-US/docs/Web/API/btoa So the naming makes sense after all. btoa() is binary to (base64 encoded) ascii. But I’m still not gonna remember this either :^)