Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obfuscating going wrong - Not same result always #34

Open
manik-ushur opened this issue Feb 24, 2022 · 1 comment
Open

Obfuscating going wrong - Not same result always #34

manik-ushur opened this issue Feb 24, 2022 · 1 comment

Comments

@manik-ushur
Copy link

manik-ushur commented Feb 24, 2022

node --version
v10.16.3
"gulp-concat": "~2.3.3",
"gulp-preprocess": "^1.2.0",
"gulp-javascript-obfuscator": "^1.1.2",
The following gulp code is used:

var preprocess = require('gulp-preprocess'),
concat = require('gulp-concat'),
javascriptobfuscator = require('gulp-javascript-obfuscator');


gulp.task('app', function() {
    return gulp.src('./js/app.js')
      .pipe(preprocess({
          context: {
            HOST: host,
            VER: ver
          }
        }))
        .pipe(concat('app.js'))
        .pipe(javascriptobfuscator({
          reservedStrings:['loadScript','loadCss']
        }))
        .pipe( gulp.dest('dist/target/js'));
  });

The following code:
if(index < scriptFiles.length-1)

is converted to:
if (_0x219af0 < _0x441e3a[_0x56ae('0xf')] - 0x1)

If I step through in Chrome Browser, _0x56ae('0xf') is incorrectly equated as 'style' instead of 'length'.
If I build it again, it goes fine.
So, it is intermittent. Can somebody point if I am doing anything wrong?

@manik-ushur manik-ushur changed the title Obfuscating going wrong - Not same error always Obfuscating going wrong - Not same result always Feb 24, 2022
@manik-ushur
Copy link
Author

I am not sure if this helps. I am using nvm for node version management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant