Skip to content

Obfuscating going wrong - Not same result always #34

@manik-ushur

Description

@manik-ushur

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?

Activity

changed the title [-]Obfuscating going wrong - Not same error always[/-] [+]Obfuscating going wrong - Not same result always[/+] on Feb 24, 2022
manik-ushur

manik-ushur commented on Feb 28, 2022

@manik-ushur
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @manik-ushur

        Issue actions

          Obfuscating going wrong - Not same result always · Issue #34 · javascript-obfuscator/gulp-javascript-obfuscator