Skip to content

Commit 5ec57a8

Browse files
committed
Obfuscator version update to 2.9.1
1 parent 600b6ef commit 5ec57a8

File tree

7 files changed

+78
-9
lines changed

7 files changed

+78
-9
lines changed

App/actions/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ export const setStringArrayThreshold = (threshold) => ({
144144
threshold
145145
});
146146

147+
export const setStringArrayIndexesType = (indexesType) => ({
148+
'type': types.SET_STRING_ARRAY_INDEXES_TYPE,
149+
indexesType
150+
});
151+
147152
export const setStringArrayEncoding = (encoding) => ({
148153
'type': types.SET_STRING_ARRAY_ENCODING,
149154
encoding
@@ -154,6 +159,11 @@ export const setStringArrayWrappersCount = (stringArrayWrappersCount) => ({
154159
stringArrayWrappersCount
155160
});
156161

162+
export const setStringArrayWrappersParametersMaxCount = (stringArrayWrappersParametersMaxCount) => ({
163+
'type': types.SET_STRING_ARRAY_WRAPPERS_PARAMETERS_MAX_COUNT,
164+
stringArrayWrappersParametersMaxCount
165+
});
166+
157167
export const setStringArrayWrappersType = (stringArrayWrappersType) => ({
158168
'type': types.SET_STRING_ARRAY_WRAPPERS_TYPE,
159169
stringArrayWrappersType

App/constants/ActionTypes.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@ export const TOGGLE_SPLIT_STRINGS = 'TOGGLE_SPLIT_STRINGS';
2828
export const SET_SPLIT_STRINGS_CHUNK_LENGTH = 'SET_SPLIT_STRINGS_CHUNK_LENGTH';
2929

3030
export const SET_STRING_ARRAY_THRESHOLD = 'SET_STRING_ARRAY_THRESHOLD';
31+
export const SET_STRING_ARRAY_INDEXES_TYPE = 'SET_STRING_ARRAY_INDEXES_TYPE';
3132
export const TOGGLE_STRING_ARRAY = 'TOGGLE_STRING_ARRAY';
33+
export const TOGGLE_STRING_ARRAY_INDEX_SHIFT = 'TOGGLE_STRING_ARRAY_INDEX_SHIFT';
3234
export const TOGGLE_ROTATE_STRING_ARRAY = 'TOGGLE_ROTATE_STRING_ARRAY';
3335
export const TOGGLE_SHUFFLE_STRING_ARRAY = 'TOGGLE_SHUFFLE_STRING_ARRAY';
3436
export const SET_STRING_ARRAY_ENCODING = 'SET_STRING_ARRAY_ENCODING';
3537

3638
export const SET_STRING_ARRAY_WRAPPERS_COUNT = 'SET_STRING_ARRAY_WRAPPERS_COUNT';
39+
export const SET_STRING_ARRAY_WRAPPERS_PARAMETERS_MAX_COUNT = 'SET_STRING_ARRAY_WRAPPERS_PARAMETERS_MAX_COUNT';
3740
export const TOGGLE_STRING_ARRAY_WRAPPERS_CHAINED_CALLS = 'TOGGLE_STRING_ARRAY_WRAPPERS_CHAINED_CALLS';
3841
export const SET_STRING_ARRAY_WRAPPERS_TYPE = 'SET_STRING_ARRAY_WRAPPERS_TYPE';
3942

App/containers/OptionsContainer.js

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
44
import {connect} from 'react-redux';
55
const ReactMarkdown = require('react-markdown')
66

7-
import {Container, Form, Grid, Header, Segment, Divider, Button} from 'semantic-ui-react';
7+
import {Form, Grid, Header, Segment, Divider, Button} from 'semantic-ui-react';
88

99
import EntryInputContainer from '../containers/EntryInputContainer';
1010
import {getOptionsMarkdown} from '../util/get-options-markdown';
@@ -34,6 +34,14 @@ const SOURCEMAP_OPTIONS = [
3434
{text: 'Separate', value: SOURCEMAP_SEPARATE},
3535
];
3636

37+
export const STRING_ARRAY_INDEXES_TYPE_HEXADECIMAL_NUMBER = 'hexadecimal-number';
38+
export const STRING_ARRAY_INDEXES_TYPE_HEXADECIMAL_NUMERIC_STRING = 'hexadecimal-numeric-string';
39+
40+
const STRING_ARRAY_INDEXES_TYPE_OPTIONS = [
41+
{text: 'Hexadecimal Number', value: STRING_ARRAY_INDEXES_TYPE_HEXADECIMAL_NUMBER},
42+
{text: 'Hexadecimal Numeric String', value: STRING_ARRAY_INDEXES_TYPE_HEXADECIMAL_NUMERIC_STRING}
43+
];
44+
3745
export const STRING_ARRAY_ENCODING_NONE = 'none';
3846
export const STRING_ARRAY_ENCODING_BASE64 = 'base64';
3947
export const STRING_ARRAY_ENCODING_RC4 = 'rc4';
@@ -228,6 +236,22 @@ const Options = ({dispatch, options}) => {
228236
step="0.05"
229237
onChange={(event, {value}) => dispatch(actions.setStringArrayThreshold(parseFloat(value)))}
230238
disabled={!options.stringArrayThresholdEnabled}/>
239+
`
240+
<Form.Checkbox
241+
label='String Array Index Shift'
242+
checked={options.stringArrayIndexShift}
243+
disabled={!options.stringArray}
244+
onChange={() => dispatch(actions.toggleOption(types.TOGGLE_STRING_ARRAY_INDEX_SHIFT))}/>
245+
246+
<Form.Select
247+
disabled={!options.stringArrayIndexesType}
248+
label='String Array Indexes Type'
249+
fluid
250+
multiple
251+
placeholder="Select indexes type type"
252+
value={options.stringArrayIndexesType}
253+
onChange={(event, {value}) => dispatch(actions.setStringArrayIndexesType(value))}
254+
options={STRING_ARRAY_INDEXES_TYPE_OPTIONS}/>
231255

232256
<Form.Input
233257
type='number'
@@ -248,6 +272,15 @@ const Options = ({dispatch, options}) => {
248272
disabled={!options.stringArray || !options.stringArrayWrappersCount}
249273
/>
250274

275+
<Form.Input
276+
type='number'
277+
label='String Array Wrappers Parameters Maximum Count'
278+
value={options.stringArrayWrappersParametersMaxCount}
279+
min="2"
280+
step="1"
281+
onChange={(event, {value}) => dispatch(actions.setStringArrayWrappersParametersMaxCount(parseInt(value)))}
282+
disabled={options.stringArrayWrappersType !== STRING_ARRAY_WRAPPERS_TYPE_FUNCTION}/>
283+
251284
<Form.Checkbox
252285
label='String Array Wrappers Chained Calls'
253286
checked={options.stringArrayWrappersChainedCalls}

App/reducers/options.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
STRING_ARRAY_ENCODING_NONE,
99
STRING_ARRAY_ENCODING_BASE64,
1010
STRING_ARRAY_ENCODING_RC4,
11-
STRING_ARRAY_WRAPPERS_TYPE_VARIABLE
11+
STRING_ARRAY_WRAPPERS_TYPE_VARIABLE, STRING_ARRAY_INDEXES_TYPE_HEXADECIMAL_NUMBER
1212
} from '../containers/OptionsContainer';
1313

1414
const initialState = {
@@ -39,13 +39,18 @@ const initialState = {
3939
stringArrayThreshold: 0.75,
4040
stringArrayThresholdEnabled: true,
4141

42+
stringArrayIndexesType: STRING_ARRAY_INDEXES_TYPE_HEXADECIMAL_NUMBER,
43+
44+
stringArrayIndexShift: true,
45+
4246
stringArrayEncoding: [
4347
STRING_ARRAY_ENCODING_NONE
4448
],
4549
stringArrayEncodingEnabled: true,
4650

4751
stringArrayWrappersCount: 1,
4852
stringArrayWrappersChainedCalls: true,
53+
stringArrayWrappersParametersMaxCount: 2,
4954
stringArrayWrappersType: STRING_ARRAY_WRAPPERS_TYPE_VARIABLE,
5055

5156
numbersToExpressions: false,
@@ -186,6 +191,12 @@ export const options = (state = initialState, action) => {
186191
};
187192
}
188193

194+
case types.TOGGLE_STRING_ARRAY_INDEX_SHIFT:
195+
return {
196+
...state,
197+
stringArrayIndexShift: !state.stringArrayIndexShift
198+
};
199+
189200
case types.TOGGLE_ROTATE_STRING_ARRAY:
190201
return {
191202
...state,
@@ -210,12 +221,24 @@ export const options = (state = initialState, action) => {
210221
stringArrayThreshold: action.threshold
211222
};
212223

224+
case types.SET_STRING_ARRAY_INDEXES_TYPE:
225+
return {
226+
...state,
227+
stringArrayIndexesType: action.indexesType
228+
};
229+
213230
case types.SET_STRING_ARRAY_WRAPPERS_COUNT:
214231
return {
215232
...state,
216233
stringArrayWrappersCount: action.stringArrayWrappersCount
217234
};
218235

236+
case types.SET_STRING_ARRAY_WRAPPERS_PARAMETERS_MAX_COUNT:
237+
return {
238+
...state,
239+
stringArrayWrappersParametersMaxCount: action.stringArrayWrappersParametersMaxCount
240+
};
241+
219242
case types.TOGGLE_STRING_ARRAY_WRAPPERS_CHAINED_CALLS:
220243
return {
221244
...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": "3.13.8",
3+
"version": "3.14.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": "2.8.1",
36+
"javascript-obfuscator": "2.9.1",
3737
"less": "2.7.1",
3838
"less-loader": "4.1.0",
3939
"pm2": "3.5.1",

templates/index.html

Lines changed: 1 addition & 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 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>@2.8.1</code>
52+
<code><a href="https://github.com/javascript-obfuscator/javascript-obfuscator" target="_new">javascript-obfuscator</a>@2.9.1</code>
5353
created by Timofey Kachalov.
5454
</p>
5555
<div id="GithubBadges">

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4447,10 +4447,10 @@ iterate-object@^1.3.0, iterate-object@^1.3.1:
44474447
resolved "https://registry.yarnpkg.com/iterate-object/-/iterate-object-1.3.4.tgz#fa50b1d9e58e340a7dd6b4c98c8a5e182e790096"
44484448
integrity sha512-4dG1D1x/7g8PwHS9aK6QV5V94+ZvyP4+d19qDv43EzImmrndysIl4prmJ1hWWIGCqrZHyaHBm6BSEWHOLnpoNw==
44494449

4450-
javascript-obfuscator@2.8.1:
4451-
version "2.8.1"
4452-
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-2.8.1.tgz#d6e33b29cc701dc86d08f709f9c73271c068c9f8"
4453-
integrity sha512-6cWbHwciIiUQNr1ZRifCNmTjN6GPO+42WQyVR58LtE/hc9hwytJsW2uSTywHdLvqbcFVIDbVpyIuS3i07czKuQ==
4450+
javascript-obfuscator@2.9.1:
4451+
version "2.9.1"
4452+
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-2.9.1.tgz#ece52d095e8ee2a01eb39622bfd1613b569cb2d8"
4453+
integrity sha512-9uc/OCq8i4nCbCfR9bK00tpJ0id9LxKpoqFysQtf2pecXzvzEOiqXyXhxrjkwCpXvy+YipIvNdUGgLua7CFGQA==
44544454
dependencies:
44554455
"@javascript-obfuscator/escodegen" "2.1.1"
44564456
"@nuxtjs/opencollective" "0.3.2"

0 commit comments

Comments
 (0)