Skip to content

Commit b61f543

Browse files
author
sanex3339
committed
Added simplify option
1 parent ab2f7b9 commit b61f543

File tree

6 files changed

+42
-17
lines changed

6 files changed

+42
-17
lines changed

App/constants/ActionTypes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export const OBFUSCATE_REJECTED = 'OBFUSCATE_REJECTED';
99
export const RESET_OPTIONS = 'RESET_OPTIONS';
1010

1111
export const TOGGLE_COMPACT_CODE = 'TOGGLE_COMPACT_CODE';
12+
export const TOGGLE_SIMPLIFY = 'TOGGLE_SIMPLIFY';
13+
1214
export const TOGGLE_SELF_DEFENDING = 'TOGGLE_SELF_DEFENDING';
1315
export const TOGGLE_DISABLE_CONSOLE_OUTPUT = 'TOGGLE_DISABLE_CONSOLE_OUTPUT';
1416

App/containers/OptionsContainer.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ const Options = ({dispatch, options}) =>
101101
<Divider/>
102102

103103
<Form.Checkbox
104-
label='Self Defending'
105-
checked={options.selfDefending}
106-
onChange={() => dispatch(actions.toggleOption(types.TOGGLE_SELF_DEFENDING))}/>
104+
label='Simplify'
105+
checked={options.simplify}
106+
onChange={() => dispatch(actions.toggleOption(types.TOGGLE_SIMPLIFY))}/>
107107

108108
<Divider/>
109109

@@ -224,6 +224,13 @@ const Options = ({dispatch, options}) =>
224224

225225
<Divider/>
226226

227+
<Form.Checkbox
228+
label='Self Defending'
229+
checked={options.selfDefending}
230+
onChange={() => dispatch(actions.toggleOption(types.TOGGLE_SELF_DEFENDING))}/>
231+
232+
<Divider/>
233+
227234
<Form.Checkbox
228235
label='Debug Protection'
229236
checked={options.debugProtection}

App/reducers/options.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const initialState = {
2323
shuffleStringArray: true,
2424
shuffleStringArrayEnabled: true,
2525

26+
simplify: true,
27+
2628
stringArrayThreshold: 0.8,
2729
stringArrayThresholdEnabled: true,
2830

@@ -88,6 +90,13 @@ export const options = (state = initialState, action) => {
8890
};
8991
}
9092

93+
case types.TOGGLE_SIMPLIFY: {
94+
return {
95+
...state,
96+
simplify: !state.simplify,
97+
};
98+
}
99+
91100
case types.TOGGLE_SELF_DEFENDING: {
92101
const selfDefending = !state.selfDefending;
93102
return {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "javascript-obfuscator-web",
3-
"version": "3.6.5",
3+
"version": "3.7.0",
44
"description": "",
55
"engines": {
66
"node": ">=12.13.1"
@@ -32,7 +32,7 @@
3232
"graceful-fs": "4.1.9",
3333
"html-webpack-plugin": "^3.2.0",
3434
"inert": "5.1.0",
35-
"javascript-obfuscator": "1.3.0",
35+
"javascript-obfuscator": "1.4.0",
3636
"less": "2.7.1",
3737
"less-loader": "4.1.0",
3838
"pm2": "3.5.1",

templates/index.html

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h1>JavaScript Obfuscator Tool</h1>
4949
<p>
5050
A free and efficient obfuscator for JavaScript (including partial support of ES2019). Make your code harder to copy and
5151
prevent people from stealing your work. This tool is a Web UI to the excellent (and open source)
52-
<code><a href="https://github.com/javascript-obfuscator/javascript-obfuscator" target="_new">javascript-obfuscator</a>@1.3.0</code>
52+
<code><a href="https://github.com/javascript-obfuscator/javascript-obfuscator" target="_new">javascript-obfuscator</a>@1.4.0</code>
5353
created by Timofey Kachalov.
5454
</p>
5555
<div id="GithubBadges">
@@ -207,14 +207,9 @@ <h3>Sounds great!</h3>
207207
</tr>
208208

209209
<tr>
210-
<td class="collapsing">Self Defending</td>
210+
<td class="collapsing">Simplify</td>
211211
<td>
212-
<p>This option makes the output code resilient against formating and variable renaming. If one
213-
tries to use a JavaScript beautifier on the obfuscated code, the code won't work anymore,
214-
making it harder to understand and modify it.</p>
215-
<p>
216-
<small>requires the <strong>Compact Code</strong> setting.</small>
217-
</p>
212+
<p>This option enables additional code obfuscation through simplification.</p>
218213
</td>
219214
</tr>
220215

@@ -422,6 +417,18 @@ <h3>Sounds great!</h3>
422417
</td>
423418
</tr>
424419

420+
<tr>
421+
<td class="collapsing">Self Defending</td>
422+
<td>
423+
<p>This option makes the output code resilient against formating and variable renaming. If one
424+
tries to use a JavaScript beautifier on the obfuscated code, the code won't work anymore,
425+
making it harder to understand and modify it.</p>
426+
<p>
427+
<small>requires the <strong>Compact Code</strong> setting.</small>
428+
</p>
429+
</td>
430+
</tr>
431+
425432
<tr>
426433
<td class="collapsing">Debug Protection</td>
427434
<td>

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4146,10 +4146,10 @@ isurl@^1.0.0-alpha5:
41464146
has-to-string-tag-x "^1.2.0"
41474147
is-object "^1.0.1"
41484148

4149-
javascript-obfuscator@1.3.0:
4150-
version "1.3.0"
4151-
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-1.3.0.tgz#644c6c8b81ae955bbe9f9caa7402017f72b50fe2"
4152-
integrity sha512-SO724FWPNAR3o9TOtCDfwRFFAmACzr4b/r9erlwvvUutq1W/ZCAsm1xEsGH/uZdTyPvipjTxUL23jl0Sc44a3Q==
4149+
javascript-obfuscator@1.4.0:
4150+
version "1.4.0"
4151+
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-1.4.0.tgz#311156cb50bc59adf5d21e89ebc2958eccb15cae"
4152+
integrity sha512-wBmiz9vY5hZJFAGWm2iRpFTSiO34660YKCSrOkgZw8AYFSjCb5Cziju68/Jc0FgmuxoeohGIvppgjfwqnY82Gw==
41534153
dependencies:
41544154
"@gradecam/tsenum" "1.2.0"
41554155
"@nuxtjs/opencollective" "0.2.2"

0 commit comments

Comments
 (0)