تشويش ملفات HTML
Pro
مع خطة مدفوعة، يمكنك تشويش ملفات HTML التي تحتوي على JavaScript مضمَّن. إذ يستخرج المشوِّش وسوم <script> المؤشَّر عليها، ويشوّش محتوياتها، ويحافظ على HTML المحيط - ويعمل ذلك مع التشويش الأساسي وتشويش VM على حد سواء.
دعم ملفات HTML
فعّل الخيار Parse HTML وسيستخرج المشوِّش وسوم <script> تلقائيًا، ويشوّش محتوياتها، ويحافظ على بنية HTML.
مثال
ملف HTML المُدخل
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
<script src="vendor.js"></script> <!-- External scripts preserved -->
</head>
<body>
<h1>Welcome</h1>
<!-- This script will NOT be obfuscated (no attribute) -->
<script>
console.log('Regular script - not obfuscated');
</script>
<!-- This script WILL be obfuscated -->
<script data-javascript-obfuscator>
// Self-contained code only!
function validateLicense(key) {
return key.length === 32 && key.startsWith('PRO-');
}
validateLicense('test');
</script>
<!-- Another obfuscated script (isolated from the one above) -->
<script data-javascript-obfuscator>
function init() {
console.log('App initialized');
}
init();
</script>
</body>
</html>
After obfuscation, only scripts with the data-javascript-obfuscator attribute are transformed. All other content remains unchanged.
Limitations
- Only scripts with
data-javascript-obfuscatorattribute are obfuscated - Each script tag is obfuscated individually - code must be self-contained and cannot reference other script tags
- Event handler attributes (
onclick,onload, etc.) are not obfuscated - JavaScript URLs (
javascript:protocol) are not obfuscated - Scripts inside HTML comments are ignored
- Source maps are not supported when Parse HTML is enabled
