gulp-bytehide-shield
A gulp plugin for obfuscating JavaScript code using ByteHide Shield.
Installation
npm install @bytehide/gulp-shield --save-dev
Usage
const gulp = require('gulp');
const bytehideShield = require('@bytehide/gulp-shield');
gulp.task('obfuscate', () => {
return gulp.src('./src/**/*.js')
.pipe(bytehideShield({
projectToken: 'your_project_token_here',
config: {
controlFlowFlattening: true,
debugProtection: false,
devtoolsBlocking: false
}
}))
.pipe(gulp.dest('./dist'));
});
Options
projectToken
: Your ByteHide Shield project token (required)config
: Configuration options for obfuscation
controlFlowFlattening
: Enable/disable control flow flatteningdebugProtection
: Enable/disable debug protectiondevtoolsBlocking
: Enable/disable devtools blocking
Features
- Obfuscates JavaScript files
- Extracts and obfuscates JavaScript from HTML, PHP, and other template files
- Adds watermark to protected files
- Prevents double obfuscation
- Supports various file types
License
MIT