Преглед на файлове

`selfDefending` option now disabled by default. Readme update.

sanex3339 преди 8 години
родител
ревизия
160edb1448
променени са 5 файла, в които са добавени 13 реда и са изтрити 7 реда
  1. 4 0
      CHANGELOG.md
  2. 3 2
      README.md
  3. 4 3
      dist/index.js
  4. 1 1
      package.json
  5. 1 1
      src/preset-options/DefaultPreset.ts

+ 4 - 0
CHANGELOG.md

@@ -1,5 +1,9 @@
 Change Log
 Change Log
 ===
 ===
+v0.8.3
+---
+* `selfDefending` option now disabled by default.
+
 v0.8.2
 v0.8.2
 ---
 ---
 * New option `seed` sets seed for random generator. This is useful for creating repeatable results.
 * New option `seed` sets seed for random generator. This is useful for creating repeatable results.

+ 3 - 2
README.md

@@ -124,7 +124,7 @@ Following options available for the JS Obfuscator:
     reservedNames: [],
     reservedNames: [],
     rotateStringArray: true,
     rotateStringArray: true,
     seed: 0,
     seed: 0,
-    selfDefending: true,
+    selfDefending: false,
     sourceMap: false,
     sourceMap: false,
     sourceMapBaseUrl: '',
     sourceMapBaseUrl: '',
     sourceMapFileName: '',
     sourceMapFileName: '',
@@ -228,8 +228,9 @@ This option sets seed for random generator. This is useful for creating repeatab
 If seed is `0` - random generator will work without seed.
 If seed is `0` - random generator will work without seed.
 
 
 ### `selfDefending`
 ### `selfDefending`
-Type: `boolean` Default: `true`
+Type: `boolean` Default: `false`
 
 
+##### :warning: Don't change obfuscated code in any way after obfuscation with this option, because any change like uglifying of code can trigger self defending and code wont work anymore!
 ##### :warning: this option forcibly set `compact` value to `true`
 ##### :warning: this option forcibly set `compact` value to `true`
 
 
 This option makes the output code resilient against formatting and variable renaming. If one tries to use a JavaScript beautifier on the obfuscated code, the code won't work anymore, making it harder to understand and modify it.
 This option makes the output code resilient against formatting and variable renaming. If one tries to use a JavaScript beautifier on the obfuscated code, the code won't work anymore, making it harder to understand and modify it.

+ 4 - 3
dist/index.js

@@ -88,7 +88,7 @@ module.exports =
 /******/ 	__webpack_require__.p = "";
 /******/ 	__webpack_require__.p = "";
 /******/
 /******/
 /******/ 	// Load entry module and return exports
 /******/ 	// Load entry module and return exports
-/******/ 	return __webpack_require__(__webpack_require__.s = 87);
+/******/ 	return __webpack_require__(__webpack_require__.s = 88);
 /******/ })
 /******/ })
 /************************************************************************/
 /************************************************************************/
 /******/ ([
 /******/ ([
@@ -1372,7 +1372,7 @@ exports.DEFAULT_PRESET = Object.freeze({
     reservedNames: [],
     reservedNames: [],
     rotateStringArray: true,
     rotateStringArray: true,
     seed: 0,
     seed: 0,
-    selfDefending: true,
+    selfDefending: false,
     sourceMap: false,
     sourceMap: false,
     sourceMapBaseUrl: '',
     sourceMapBaseUrl: '',
     sourceMapFileName: '',
     sourceMapFileName: '',
@@ -4460,7 +4460,8 @@ module.exports = require("fs");
 module.exports = require("mkdirp");
 module.exports = require("mkdirp");
 
 
 /***/ },
 /***/ },
-/* 87 */
+/* 87 */,
+/* 88 */
 /***/ function(module, exports, __webpack_require__) {
 /***/ function(module, exports, __webpack_require__) {
 
 
 "use strict";
 "use strict";

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "javascript-obfuscator",
   "name": "javascript-obfuscator",
-  "version": "0.8.2",
+  "version": "0.8.3",
   "description": "JavaScript obfuscator",
   "description": "JavaScript obfuscator",
   "keywords": [
   "keywords": [
     "obfuscator",
     "obfuscator",

+ 1 - 1
src/preset-options/DefaultPreset.ts

@@ -11,7 +11,7 @@ export const DEFAULT_PRESET: IObfuscatorOptions = Object.freeze({
     reservedNames: [],
     reservedNames: [],
     rotateStringArray: true,
     rotateStringArray: true,
     seed: 0,
     seed: 0,
-    selfDefending: true,
+    selfDefending: false,
     sourceMap: false,
     sourceMap: false,
     sourceMapBaseUrl: '',
     sourceMapBaseUrl: '',
     sourceMapFileName: '',
     sourceMapFileName: '',