Skip to content

Commit 318891a

Browse files
author
sanex3339
committed
Shuffle string array option
1 parent ce451cb commit 318891a

File tree

6 files changed

+57
-60
lines changed

6 files changed

+57
-60
lines changed

App/constants/ActionTypes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ export const TOGGLE_SPLIT_STRINGS = 'TOGGLE_SPLIT_STRINGS';
2020
export const SET_SPLIT_STRINGS_CHUNK_LENGTH = 'SET_SPLIT_STRINGS_CHUNK_LENGTH';
2121

2222
export const SET_STRING_ARRAY_THRESHOLD = 'SET_STRING_ARRAY_THRESHOLD';
23-
export const TOGGLE_ROTATE_STRING_ARRAY = 'TOGGLE_ROTATE_STRING_ARRAY';
2423
export const TOGGLE_STRING_ARRAY = 'TOGGLE_STRING_ARRAY';
24+
export const TOGGLE_ROTATE_STRING_ARRAY = 'TOGGLE_ROTATE_STRING_ARRAY';
25+
export const TOGGLE_SHUFFLE_STRING_ARRAY = 'TOGGLE_SHUFFLE_STRING_ARRAY';
2526
export const SET_STRING_ARRAY_ENCODING = 'SET_STRING_ARRAY_ENCODING';
2627

2728
export const ADD_DOMAIN_LOCK = 'ADD_DOMAIN_LOCK';

App/containers/OptionsContainer.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ const Options = ({dispatch, options}) =>
143143
disabled={!options.rotateStringArrayEnabled}
144144
onChange={() => dispatch(actions.toggleOption(types.TOGGLE_ROTATE_STRING_ARRAY))}/>
145145

146+
<Form.Checkbox
147+
label='Shuffle String Array'
148+
checked={options.shuffleStringArray}
149+
disabled={!options.shuffleStringArrayEnabled}
150+
onChange={() => dispatch(actions.toggleOption(types.TOGGLE_SHUFFLE_STRING_ARRAY))}/>
151+
146152
<Form.Select
147153
disabled={!options.stringArrayEncodingEnabled}
148154
label='String Array Encoding'

App/reducers/options.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const initialState = {
2020
rotateStringArray: true,
2121
rotateStringArrayEnabled: true,
2222

23+
shuffleStringArray: true,
24+
shuffleStringArrayEnabled: true,
25+
2326
stringArrayThreshold: 0.8,
2427
stringArrayThresholdEnabled: true,
2528

@@ -132,6 +135,7 @@ export const options = (state = initialState, action) => {
132135
...state,
133136
stringArray,
134137
rotateStringArrayEnabled: stringArray,
138+
shuffleStringArrayEnabled: stringArray,
135139
stringArrayThresholdEnabled: stringArray,
136140
stringArrayEncodingEnabled: stringArray,
137141
};
@@ -143,6 +147,12 @@ export const options = (state = initialState, action) => {
143147
rotateStringArray: !state.rotateStringArray
144148
};
145149

150+
case types.TOGGLE_SHUFFLE_STRING_ARRAY:
151+
return {
152+
...state,
153+
shuffleStringArray: !state.shuffleStringArray
154+
};
155+
146156
case types.SET_STRING_ARRAY_ENCODING:
147157
return {
148158
...state,

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": "2.4.0",
3+
"version": "2.5.0",
44
"description": "",
55
"engines": {
66
"node": ">=12.13.1"
@@ -33,7 +33,7 @@
3333
"graceful-fs": "4.1.9",
3434
"html-webpack-plugin": "^3.2.0",
3535
"inert": "5.1.0",
36-
"javascript-obfuscator": "0.22.1",
36+
"javascript-obfuscator": "0.23.0",
3737
"less": "2.7.1",
3838
"less-loader": "4.1.0",
3939
"pm2": "3.5.1",

templates/index.html

Lines changed: 8 additions & 1 deletion
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 ES2017). 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>@0.22.1</code>
52+
<code><a href="https://github.com/javascript-obfuscator/javascript-obfuscator" target="_new">javascript-obfuscator</a>@0.23.0</code>
5353
created by Timofey Kachalov.
5454
</p>
5555
<div id="GithubBadges">
@@ -322,6 +322,13 @@ <h3>Sounds great!</h3>
322322
</td>
323323
</tr>
324324

325+
<tr>
326+
<td class="collapsing">Shuffle String Array</td>
327+
<td>
328+
<p>Randomly shuffles the <code>stringArray</code> array items.</p>
329+
</td>
330+
</tr>
331+
325332
<tr>
326333
<td class="collapsing">Encode String Literals</td>
327334
<td>

yarn.lock

Lines changed: 29 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878
lodash "^4.2.0"
7979
to-fast-properties "^2.0.0"
8080

81+
"@gradecam/tsenum@1.2.0":
82+
version "1.2.0"
83+
resolved "https://registry.yarnpkg.com/@gradecam/tsenum/-/tsenum-1.2.0.tgz#0c7c7c86e00e2d9ab8f242c695bec66b26b79319"
84+
integrity sha512-61kSGjcgHBncY1WJ1Fc6VwMgHyMWMQ9A8oconZ3iYizWDKKV64JVYDFTRH/vGmaKlTQb0PXAhRzY7qnIBvYikw==
85+
8186
"@mrmlnc/readdir-enhanced@^2.2.1":
8287
version "2.2.1"
8388
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -221,10 +226,10 @@ acorn-jsx@^3.0.0:
221226
dependencies:
222227
acorn "^3.0.4"
223228

224-
acorn-jsx@^5.1.0:
225-
version "5.1.0"
226-
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384"
227-
integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==
229+
acorn@7.1.0:
230+
version "7.1.0"
231+
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
232+
integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==
228233

229234
acorn@^3.0.4:
230235
version "3.3.0"
@@ -234,11 +239,6 @@ acorn@^5.0.0, acorn@^5.5.0:
234239
version "5.5.3"
235240
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9"
236241

237-
acorn@^7.1.0:
238-
version "7.1.0"
239-
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
240-
integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==
241-
242242
agent-base@4, agent-base@^4.2.0, agent-base@^4.3.0:
243243
version "4.3.0"
244244
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee"
@@ -283,10 +283,6 @@ alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
283283
version "1.0.2"
284284
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
285285

286-
amdefine@>=0.0.4:
287-
version "1.0.1"
288-
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
289-
290286
ammo@3.x.x:
291287
version "3.0.1"
292288
resolved "https://registry.yarnpkg.com/ammo/-/ammo-3.0.1.tgz#c79ceeac36fb4e55085ea3fe0c2f42bfa5f7c914"
@@ -1907,10 +1903,10 @@ commander@2.17.x:
19071903
resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
19081904
integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==
19091905

1910-
commander@4.0.1:
1911-
version "4.0.1"
1912-
resolved "https://registry.yarnpkg.com/commander/-/commander-4.0.1.tgz#b67622721785993182e807f4883633e6401ba53c"
1913-
integrity sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA==
1906+
commander@4.1.0:
1907+
version "4.1.0"
1908+
resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.0.tgz#545983a0603fe425bc672d66c9e3c89c42121a83"
1909+
integrity sha512-NIQrwvv9V39FHgGFm36+U9SMQzbiHvU79k+iADraJTpmrFFfx7Ds0IvDoAdZsDrknlkRk14OYoWXb57uTh7/sw==
19141910

19151911
commander@~2.13.0:
19161912
version "2.13.0"
@@ -2627,17 +2623,17 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
26272623
version "1.0.5"
26282624
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
26292625

2630-
escodegen-wallaby@1.6.27:
2631-
version "1.6.27"
2632-
resolved "https://registry.yarnpkg.com/escodegen-wallaby/-/escodegen-wallaby-1.6.27.tgz#c2d3ca8b6fd4d5f0d3f770f7b1d29b958078fdb2"
2633-
integrity sha512-DFXbfLTNa/wiQRgqSseKhmzyDhwWJ4c/6IwsdAgA6qYL0ntsmSuuTMovEbA/8oCanSGkUR1qaLsDgKiWPllnjg==
2626+
escodegen@1.12.1:
2627+
version "1.12.1"
2628+
resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.1.tgz#08770602a74ac34c7a90ca9229e7d51e379abc76"
2629+
integrity sha512-Q8t2YZ+0e0pc7NRVj3B4tSQ9rim1oi4Fh46k2xhJ2qOiEwhQfdjyEQddWdj7ZFaKmU+5104vn1qrcjEPWq+bgQ==
26342630
dependencies:
2635-
esprima "^2.7.1"
2636-
estraverse "^1.9.1"
2631+
esprima "^3.1.3"
2632+
estraverse "^4.2.0"
26372633
esutils "^2.0.2"
26382634
optionator "^0.8.1"
26392635
optionalDependencies:
2640-
source-map "~0.2.0"
2636+
source-map "~0.6.1"
26412637

26422638
escodegen@1.x.x:
26432639
version "1.12.0"
@@ -2671,11 +2667,6 @@ eslint-visitor-keys@^1.0.0:
26712667
version "1.0.0"
26722668
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
26732669

2674-
eslint-visitor-keys@^1.1.0:
2675-
version "1.1.0"
2676-
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
2677-
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
2678-
26792670
eslint@4.19.1:
26802671
version "4.19.1"
26812672
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300"
@@ -2719,15 +2710,6 @@ eslint@4.19.1:
27192710
table "4.0.2"
27202711
text-table "~0.2.0"
27212712

2722-
espree@6.1.2:
2723-
version "6.1.2"
2724-
resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d"
2725-
integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==
2726-
dependencies:
2727-
acorn "^7.1.0"
2728-
acorn-jsx "^5.1.0"
2729-
eslint-visitor-keys "^1.1.0"
2730-
27312713
espree@^3.5.4:
27322714
version "3.5.4"
27332715
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
@@ -2740,7 +2722,7 @@ esprima@3.x.x, esprima@^3.1.3:
27402722
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
27412723
integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=
27422724

2743-
esprima@^2.6.0, esprima@^2.7.1:
2725+
esprima@^2.6.0:
27442726
version "2.7.3"
27452727
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
27462728

@@ -2765,10 +2747,6 @@ estraverse@4.3.0, estraverse@^4.2.0:
27652747
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
27662748
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
27672749

2768-
estraverse@^1.9.1:
2769-
version "1.9.3"
2770-
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
2771-
27722750
estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
27732751
version "4.2.0"
27742752
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
@@ -4126,18 +4104,19 @@ isurl@^1.0.0-alpha5:
41264104
has-to-string-tag-x "^1.2.0"
41274105
is-object "^1.0.1"
41284106

4129-
javascript-obfuscator@0.20.2:
4130-
version "0.20.2"
4131-
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-0.20.2.tgz#0a03163d4ba9db6958d76b5d0fbf26574c2419f6"
4132-
integrity sha512-yd2bD208F2KEm6Vp8LGJF1xAO27VNmQonj27/9VwsIs9uJwZ82P53xFDS/aMKCPy7MPkGeQU5kOGdOpzUqTmBg==
4107+
javascript-obfuscator@0.23.0:
4108+
version "0.23.0"
4109+
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-0.23.0.tgz#d1b10ce2fea63d86213823359975387a6b689fda"
4110+
integrity sha512-Tv56zGUGZkZqs4ehgOxrhHOlbO1GP9QwlwDXgPqjmi+vE12iwNtTZJOPnVhG8NC3XIQ21jr/9YstbNHWfMUd4g==
41334111
dependencies:
4112+
"@gradecam/tsenum" "1.2.0"
41344113
"@nuxtjs/opencollective" "0.2.2"
4114+
acorn "7.1.0"
41354115
chalk "3.0.0"
41364116
chance "1.1.4"
41374117
class-validator "0.11.0"
4138-
commander "4.0.1"
4139-
escodegen-wallaby "1.6.27"
4140-
espree "6.1.2"
4118+
commander "4.1.0"
4119+
escodegen "1.12.1"
41414120
estraverse "4.3.0"
41424121
eventemitter3 "4.0.0"
41434122
inversify "5.0.1"
@@ -6745,12 +6724,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
67456724
version "0.6.1"
67466725
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
67476726

6748-
source-map@~0.2.0:
6749-
version "0.2.0"
6750-
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
6751-
dependencies:
6752-
amdefine ">=0.0.4"
6753-
67546727
spdx-correct@^3.0.0:
67556728
version "3.0.0"
67566729
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"

0 commit comments

Comments
 (0)