Merge branch 'domain-lock' of https://github.com/slig/javascript-obfuscator into slig-domain-lock

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

DomainLock feature WIP
This commit is contained in:
sanex3339
2016-09-01 18:36:03 +03:00
parent d764720e62
commit a70f192a1c
17 changed files with 486 additions and 152 deletions
@@ -13,7 +13,7 @@ describe('UnicodeArrayCallsWrapper', () => {
}
);
assert.match(obfuscationResult.getObfuscatedCode(), /return _0x([a-z0-9]){4}\[parseInt\(_0x([a-z0-9]){6}, *0x010\)\];/);
assert.match(obfuscationResult.getObfuscatedCode(), /return _0x([a-z0-9]){4}\[parseInt\(_0x([a-z0-9]){5,6}, *0x010\)\];/);
});
it('should\'t append `UnicodeArrayDecodeNode` custom node into the obfuscated code if `wrapUnicodeArrayCalls` option is not set', () => {
@@ -24,6 +24,6 @@ describe('UnicodeArrayCallsWrapper', () => {
}
);
assert.notMatch(obfuscationResult.getObfuscatedCode(), /return _0x([a-z0-9]){4}\[parseInt\(_0x([a-z0-9]){6}, *0x010\)\];/);
assert.notMatch(obfuscationResult.getObfuscatedCode(), /return _0x([a-z0-9]){4}\[parseInt\(_0x([a-z0-9]){5,6}, *0x010\)\];/);
});
});
@@ -13,7 +13,7 @@ describe('UnicodeArrayDecodeNode', () => {
}
);
assert.match(obfuscationResult.getObfuscatedCode(), /decodeURI\(atob\(_0x([a-z0-9]){4}\[_0x([a-z0-9]){6}\]\)\)/);
assert.match(obfuscationResult.getObfuscatedCode(), /decodeURI\(atob\(_0x([a-z0-9]){4}\[_0x([a-z0-9]){5,6}\]\)\)/);
});
it('should\'t append `UnicodeArrayDecodeNode` custom node into the obfuscated code if `encodeUnicodeLiterals` option is not set', () => {
@@ -24,6 +24,6 @@ describe('UnicodeArrayDecodeNode', () => {
}
);
assert.notMatch(obfuscationResult.getObfuscatedCode(), /decodeURI\(atob\(_0x([a-z0-9]){4}\[_0x([a-z0-9]){6}\]\)\)/);
assert.notMatch(obfuscationResult.getObfuscatedCode(), /decodeURI\(atob\(_0x([a-z0-9]){4}\[_0x([a-z0-9]){5,6}\]\)\)/);
});
});
@@ -13,7 +13,7 @@ describe('UnicodeArrayRotateFunctionNode', () => {
}
);
assert.match(obfuscationResult.getObfuscatedCode(), /while *\(-- *_0x([a-z0-9]){6}\) *\{/);
assert.match(obfuscationResult.getObfuscatedCode(), /while *\(-- *_0x([a-z0-9]){5,6}\) *\{/);
});
it('should\'t append `UnicodeArrayRotateFunctionNode` custom node into the obfuscated code if `rotateUnicodeArray` option is not set', () => {
@@ -24,6 +24,6 @@ describe('UnicodeArrayRotateFunctionNode', () => {
}
);
assert.notMatch(obfuscationResult.getObfuscatedCode(), /while *\(-- *_0x([a-z0-9]){6}\) *\{/);
assert.notMatch(obfuscationResult.getObfuscatedCode(), /while *\(-- *_0x([a-z0-9]){5,6}\) *\{/);
});
});