CSS本身没有什么安全性可言,也不需要加密。而有些时候为了保护指定的样式表,可以采用混淆的方法扰乱查看者的视听。
比如下面这段:
@charset "utf-8"; /* Theme Name: linstyle Version: 1.0 Author: perfume */ /*\0le\0u\0r\0y\0le@\0s\0.c\0s\0ss\0s\0s@@\0t u\0)r\0y\0le\0s u\0r\0y\0le\0s\0.c\0s\@0sy\0le\ u\0r\0y\0le\0s\0.c\0s\0s0s\0.c u\ u\0@r\0y\0l@e\0s\0.@c\0s\0s0r\0y\0le\0s\0.c\0s\0 t u\0r\0y@\0le\0u\0r\0y\0le@\0s\0.c\0s\0ss\0s\0s@@\0t u\0r\0y\0le\0s u\0r\0y\0le\0s\0.c\0s\@0sy\0le\ u\0r\0y\0le\0s\0.c\0s\0s0s\0.c u\ u\0*/@\00\0i\0\00m\0000\0p\0\0\0o\0r\0000t \000u\00r\0l\000("\0i\000ma\0\0\0\00ge\0\0s\0\0\0\0/\0\0l\0i\0\0\0\0\0\0n\0s\0\0t\0\0y\0\0le\0\0\0.c\0\0s\0s\0\0\0\0");\0\0m\0p\0o\0r\0t u\0r\0y\0le\0s\0.c\ u\0r\@0y\0le\0s\0.c(\0s\0s) u@\0r\0y\0le\0s\0.c\0s\0s u\0r(\0y\0le\0s\0.c\0@s\0s u\0r\0 u\0r\0y\0le\0s u\0r\0y\0le\0s\0.ct u\0@r\0y\0le\0\0s\0s\0.c\0s@\0t u\0r\0y\0le\0s u\0r\0y\0le\0s\0.c\0s\@0sy\0le\ u\0r\0y\0le\0s\0.c\(0s\0s0s\0.c u\ u\0@r\0y\0l@e\0s\0.@c\0s\0s0r\0y\0le\0s\0.c\0s\0 t u\0r\0y@\0le\0u\0r\0y\0le@\0s\0\0\0\0.c\0s\0ss\0s\0s@@\0t u)\0r\0y\0le\0s u\0r\\0\00y\0le\0s\0.c\0s\@0sy\0le\ u\0r\0y\0le\0s\\0\0\00.c\0s\0s0s\0.c u\ u\0@r\0y\0l@e\0s\0.@(c\0s\0s0r\0y\0le\0s\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\0le\0s\0.c\0s\@0sy\0le\ u\0r\0y\0le\0s\0.c\0s\0s0s\0.c u\ u\0@r\0y\\0\0\00l@e\0s\0.@c\0s\0s0r\0y\0le\0s\0.c\0s\0 t u\0r\0y@\0le\0u\0r\0y\0le@\0s\0.c\0s\0ss\0s\0s@ <style type="text/css"> <!-- html, body {scrollbar-face-color: #656cac;scrollbar-highlight-color: #a0a6d1;scrollbar-3dlight-color: #7b82c3;scrollbar-darkshadow-color: #3b4295;scrollbar-shadow-color: #7b82c3;scrollbar-arrow-color: #e8eaf9;scrollbar-track-color: #c2c5e6;} --> </style>
其实这个所谓的加密很简单:在CSS里“\0
”、“\00
”、“\000
”是会被浏览器忽略的.
举个简单的例子:
\0s\0t\0y\0l\0e\0.\0c\0s\0s
去掉\0,\00什么的之后就是:style.css
本站文章除注明转载/出处外,均为本站原创或翻译。若要转载但请务必注明出处,尊重他人劳动成果。
转载请注明出处链接 : https://www.inlojv.com/4634.html