I'm getting to know Grunt, trying to do some obfuscation of my test php file.
Here's the original code, just a simple hello world
<?php
echo 'hello world';
Obfuscated using grunt-hazy:
<?php eval("?>".base64_decode("PD9waHANCmVjaG8gJ2hlbGxvIHdvcmxkJzs=")."<?"); ?>
And the error:
Parse error: syntax error, unexpected '<' in D:\Projects\Grunter\hazed\index.php(1) : eval()'d code on line 2
Here's my Gruntfile
module.exports = function(grunt){
grunt.initConfig({
hazy: {
php: {
expand: true,
cwd: '',
dest: 'hazed',
src: [ '*.php' ]
}
},
watch: {
scripts: {
files: ['*.php'],
tasks: ['hazy']
}
}
});
grunt.loadNpmTasks('grunt-hazy');
grunt.loadNpmTasks('grunt-contrib-watch');
};
What am I doing wrong? Is it a bug with the plugin?