4 ms·
How to password protect a static HTML page with no JavaScript and only CSS
- LinuxBender 4y agoIs rot13 really considered encryption? If so here are some shell functions to go with this. function rot13() { if [ -r $1 ]; then cat $1 | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]'; else echo $* | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]'; fi } function rot47() { if [ -r $1 ]; then cat $1 | tr '\!-~' 'P-~\!-O' ; else echo $* | tr '\!-~' 'P-~\!-O'; fi } Example: echo 'Guvf vf zl fhcre frperg grkg. Ab bar pna ernq vg. Abg rira Pnrfre uvzfrys! Vs lbh jnag gb haqrefgnaq ubj guvf vaperqvoyl fgebat naq sbbycebbs rapelcgvba jbexf, cyrnfr ernq zl oybt.' | rot13 This is my super secret text. No one can read it. Not even Caeser himself! If you want to understand how this incredibly strong and foolproof encryption works, please read my blog. - Adding my own super-encrypted text: V nz n fvyyl jbzong
- superkuh 4y agoIn yesterday's thread about the non-static HTML page encryption with javascript there was some mumbling about how even CSS can make a static HTML page no longer static. Well, I guess Terence proved it. CSS can do everything these days. http://www.commitstrip.com/en/2019/03/15/css-css-everywhere/ http://www.commitstrip.com/en/2019/03/15/css-css-everywhere/