July 22, 2015

New Jscrambler 3.8 is Here!

By Jscrambler | 2 min read

Automatic and safe renaming of all identifiers is hard in JavaScript because the language is too dynamic. Up until now, every time you used Rename All, you had to double-check for broken naming references, and exclude them from being renamed.

This often led people to use Rename Local instead of Rename All.

In 3.8, we included two new modes to control how renaming works and easily select which identifiers should be targeted. From now on, you will be able to have fine grain control over the public identifiers that are renamed.

New Jscrambler 3.8 is Here!

Unsafe Mode

Leaves out all identifiers that are part of HTML5/JS native APIs but it renamesall the rest, regardless of whether they are defined or not, which in some cases may lead to errors.

source code:

var varDefined = 1;

function fnDefined(paramLocal) {
    window.alert(paramLocal);
}
fnDefined(varDefined);
fnNotDefined(varNotDefined);

UNSAFE mode:

var d = 1;

function e(a) {
    window.alert(a);
}
e(d);
c(b);

Safest Mode

You can’t go wrong with this one – this mode only renames identifiers whose definition can be found inside the source code, thus avoiding code errors. It’s a safer, less aggressive version.

source code:

var varDefined = 1;

function fnDefined(paramLocal) {
    window.alert(paramLocal);
}
fnDefined(varDefined);
fnNotDefined(varNotDefined);

SAFEST mode:

var b = 1;

function c(a) {
    window.alert(a);
}
c(b);
fnNotDefined(varNotDefined);

Include and Exclude Lists

Regardless of the mode you use, you can always add or remove names from being renamed using two lists.This way the power is yours and errors or unwanted renaming will be gone forever.

Include List – there’s an identifier you really want to rename? Put it in this list. Identifiers placed here will be renamed, whether their definition is found or not (Safest Mode);

Exclude List – if any identifier is present here, it won’t be renamed. If your code somehow stops working, you can pick the identifier that is causing the issue and make sure it will be excluded from the targets, end of story!

More Potency

By targeting more names, the obfuscation becomes instantaneously more potent. After all, names are one of the main things in the code that help us understand its meaning. Also, let’s not forget that those extra names that we’ll be able to remove from the code will also be targeted by other transformations that will make the end result even more difficult to grasp. All of this, in a safe, controllable way.

With JScrambler, Rename All doesn’t have to be a pain anymore and you can save time for other things, like enjoying your summer, coding your million-dollar idea or knitting…Whatever you prefer.

Author
JscramblerThe leader in client-side Web security. With Jscrambler, JavaScript applications become self-defensive and capable of detecting and blocking client-side attacks like Magecart.
View All Posts

Subscribe to our weekly newsletter

Learn more about new security threats and technologies.

I agree to receive these emails and accept the Privacy Policy.