HTML/CSS 混淆编译

HTML/CSS Obfuscation Compiling

我有一个关于混淆 HTML 和 CSS 文件的最终输出的问题。 让我们留下来,我在下面有这个 HTML 代码,在单独的 CSS 文件中声明了相应的 class 名称:

<div class="header">
  <div class="logo"></div>
  <div class="session-info"></div>
</div> 

<div class="bank-account-content">
  <div class="account-info"></div>
  <div class="account-info"></div>
  <div class="here-is-my-ss-number"></div>
</div> 

有没有办法获取我的 HTML/CSS 文件并以某种方式处理它,它将在 HTML/CSS 文件中获取原始 class names/ids 并随机生成新文件用无意义的 class names/ids 替换现有的 class names/ids 来掩盖最终输出?例如,上面的输出将被处理并导致下面显示的 html 具有相应的样式 sheet,其中定义了抽象的 class/id 名称。

<div class="1dcx4y">
  <div class="1354fs"></div>
  <div class="f3wecd"></div>
</div> 

<div class="retv5">
  <div class="dgee2f></div>
  <div class="fhg54h"></div>
  <div class="dgd426"></div>
</div> 

尝试 http://www.cssobfuscator.com/:

What it does:
- It will take your CSS file, apply minification, encoding and encypting and finally injects this unreadable crap into tailored JS library (also obfuscated).
- The result you will get is this tailored (unique) library, containing obfuscated CSS. Just include it in the place of the original CSS.
What it does not:
- It will not speed up displaying of your web.
- It will not hide CSS rules in inspector (developer's tools) - but it don't mind, attacker will probably not copy all stuff by one rule.

http://htmlmuncher.com/: (Dead link, Github repository)

HTML Muncher is a command line utility written in Python that rewrites classes and ids in CSS, HTML, and JavaScript files in order to save precious bytes and obfuscate your code.
How it Works
1. You pass in a list of CSS, HTML, and JavaScript files to be rewritten
2. The CSS and JavaScript files are scanned to find any class and id references
3. The classes and ids are mapped to new classes and ids with 1 or 2 letter names (a, b, c ... aa, ab, ac ...)
4. The files are rewritten with the new class and id names and saved to a new location on disk