Skip to content

Commit e8d7c67

Browse files
author
sanex3339
committed
Version update to 0.20.0
1 parent b31b0a2 commit e8d7c67

File tree

7 files changed

+59
-21
lines changed

7 files changed

+59
-21
lines changed

App/actions/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ export const removeReservedString = (string) => ({
6363
string
6464
});
6565

66+
export const addDictionaryIdentifier = (name) => ({
67+
'type': types.ADD_DICTIONARY_IDENTIFIER,
68+
name
69+
});
70+
71+
export const removeDictionaryIdentifier = (name) => ({
72+
'type': types.REMOVE_DICTIONARY_IDENTIFIER,
73+
name
74+
});
75+
6676
export const setSplitStringsChunkLength = (chunkLength) => ({
6777
'type': types.SET_SPLIT_STRINGS_CHUNK_LENGTH,
6878
chunkLength

App/constants/ActionTypes.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export const REMOVE_RESERVED_NAME = 'REMOVE_RESERVED_NAME';
3333
export const ADD_RESERVED_STRING = 'ADD_RESERVED_STRING';
3434
export const REMOVE_RESERVED_STRING = 'REMOVE_RESERVED_STRING';
3535

36+
export const ADD_DICTIONARY_IDENTIFIER = 'ADD_DICTIONARY_IDENTIFIER';
37+
export const REMOVE_DICTIONARY_IDENTIFIER = 'REMOVE_DICTIONARY_IDENTIFIER';
38+
3639
export const SET_SEED = 'SET_SEED';
3740

3841
export const SET_CONTROL_FLOW_FLATTENING_THRESHOLD = 'SET_CONTROL_FLOW_FLATTENING_THRESHOLD';

App/containers/OptionsContainer.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ const TARGET_OPTIONS = [
3636
{text: 'Node', value: TARGET_NODE},
3737
];
3838

39+
export const IDENTIFIER_NAMES_GENERATOR_DICTIONARY = 'dictionary';
3940
export const IDENTIFIER_NAMES_GENERATOR_HEXADECIMAL = 'hexadecimal';
4041
export const IDENTIFIER_NAMES_GENERATOR_MANGLED = 'mangled';
4142

4243
const IDENTIFIER_NAMES_GENERATOR_OPTIONS = [
44+
{text: 'dictionary', value: IDENTIFIER_NAMES_GENERATOR_DICTIONARY},
4345
{text: 'hexadecimal', value: IDENTIFIER_NAMES_GENERATOR_HEXADECIMAL},
4446
{text: 'mangled', value: IDENTIFIER_NAMES_GENERATOR_MANGLED},
4547
];
@@ -62,6 +64,15 @@ const Options = ({dispatch, options}) =>
6264
onChange={(event, {value}) => dispatch(actions.setIdentifierNamesGenerator(value))}
6365
options={IDENTIFIER_NAMES_GENERATOR_OPTIONS}/>
6466

67+
<EntryInputContainer
68+
label='Identifiers Dictionary'
69+
disabled={options.identifierNamesGenerator !== IDENTIFIER_NAMES_GENERATOR_DICTIONARY}
70+
actionAddEntryToState={(name) => dispatch(actions.addDictionaryIdentifier(name))}
71+
actionRemoveEntryFromState={(name) => dispatch(actions.removeDictionaryIdentifier(name))}
72+
placeholder="foo"
73+
entries={options.identifiersDictionary}
74+
buttonIcon="plus"/>
75+
6576
<Form.Input
6677
label='Identifiers Prefix'
6778
onBlur={(event) => dispatch(actions.setIdentifiersPrefix(event.target.value))}

App/reducers/options.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const initialState = {
5151
target: 'browser',
5252

5353
identifierNamesGenerator: 'hexadecimal',
54+
identifiersDictionary: [],
5455
identifiersPrefix: '',
5556

5657
transformObjectKeys: false,
@@ -227,6 +228,21 @@ export const options = (state = initialState, action) => {
227228
reservedStrings: state.reservedStrings.filter((string) => string !== action.string),
228229
};
229230

231+
case types.ADD_DICTIONARY_IDENTIFIER: {
232+
const name = action.name;
233+
234+
return {
235+
...state,
236+
identifiersDictionary: [...state.identifiersDictionary, name],
237+
};
238+
}
239+
240+
case types.REMOVE_DICTIONARY_IDENTIFIER:
241+
return {
242+
...state,
243+
identifiersDictionary: state.identifiersDictionary.filter((name) => name !== action.name),
244+
};
245+
230246
case types.SET_SEED:
231247
return {
232248
...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.2.0",
3+
"version": "2.3.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.19.4",
36+
"javascript-obfuscator": "0.20.0",
3737
"less": "2.7.1",
3838
"less-loader": "4.1.0",
3939
"pm2": "3.5.1",

templates/index.html

Lines changed: 13 additions & 2 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 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.19.4</code>
52+
<code><a href="https://github.com/javascript-obfuscator/javascript-obfuscator" target="_new">javascript-obfuscator</a>@0.20.0</code>
5353
created by Timofey Kachalov.
5454
</p>
5555
<div id="GithubBadges">
@@ -139,6 +139,10 @@ <h3>Sounds great!</h3>
139139
<p>Use this option to control how identifiers (variable names, functions names, etc) will be
140140
obfuscated.</p>
141141

142+
<strong>dictionary</strong>
143+
<p>Generates identifier names using names from <code>identifiersDictionary</code> list
144+
</p>
145+
142146
<strong>hexadecimal</strong>
143147
<p>Generates random identifier names using a hexadecimal pattern (e.g: <code>0xabc123</code>)
144148
</p>
@@ -149,6 +153,13 @@ <h3>Sounds great!</h3>
149153
</td>
150154
</tr>
151155

156+
<tr>
157+
<td class="collapsing">Identifiers Dictionary</td>
158+
<td>
159+
<p>This options sets identifiers list for <code>identifierNamesGenerator: dictionary</code> option
160+
</td>
161+
</tr>
162+
152163
<tr>
153164
<td class="collapsing">Identifiers Prefix</td>
154165
<td>
@@ -609,7 +620,7 @@ <h3 class="ui header">Support project:</h3>
609620
<div class="column">
610621
<div class="ui divider"></div>
611622
<span>&copy;
612-
<a href="https://www.tiagoserafim.com/">Tiago Serafim</a> - <a
623+
<a href="https://www.tiagoserafim.com/">Tiago Serafim</a>, <a href="https://github.com/sanex3339">Timofey Kachalov</a> - <a
613624
href="https://github.com/javascript-obfuscator/javascript-obfuscator-ui">source-code</a> - Powered by <a
614625
href="https://github.com/javascript-obfuscator/javascript-obfuscator">JavaScript Obfuscator</a>
615626
</span>

yarn.lock

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@
4646
esutils "^2.0.2"
4747
js-tokens "^3.0.0"
4848

49-
50-
version "7.7.4"
51-
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.4.tgz#b23a856751e4bf099262f867767889c0e3fe175b"
52-
integrity sha512-r24eVUUr0QqNZa+qrImUk8fn5SPhHq+IfYvIoIMg0do3GdK9sMdiLKP3GYVVaxpPKORgm8KRKaNTEhAjgIpLMw==
53-
dependencies:
54-
regenerator-runtime "^0.13.2"
55-
5649
5750
version "7.0.0-beta.46"
5851
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.46.tgz#8b23982411d5b5dbfa479437bfe414adb1411bb9"
@@ -4145,12 +4138,11 @@ isurl@^1.0.0-alpha5:
41454138
has-to-string-tag-x "^1.2.0"
41464139
is-object "^1.0.1"
41474140

4148-
javascript-obfuscator@0.19.0:
4149-
version "0.19.0"
4150-
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-0.19.0.tgz#95b26d4dccfc60a2af0dd45c6abb569357d6da5b"
4151-
integrity sha512-qPFGXDAx2AdDpaOGVuZByvrQIbEbaA7yfH8jDQqPagqQNu21e+YEe5A7fqR3Nd3jKlpHf4CxHp7XUIRpGe33/Q==
4141+
javascript-obfuscator@0.20.0:
4142+
version "0.20.0"
4143+
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-0.20.0.tgz#54719a9c2ed2b757a591ccb1a4e29f96dbd13b17"
4144+
integrity sha512-9gTGu9I7tTKHumzRSOu0C4Ym1emQ5kbxn8QR6/YjQC4SbkDDLdz6L3dDNLqqseGH7KCvZ0tgWxDo/OOIl/sfTg==
41524145
dependencies:
4153-
"@babel/runtime" "7.7.4"
41544146
chalk "3.0.0"
41554147
chance "1.1.3"
41564148
class-validator "0.11.0"
@@ -6257,11 +6249,6 @@ regenerator-runtime@^0.11.0:
62576249
version "0.11.1"
62586250
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
62596251

6260-
regenerator-runtime@^0.13.2:
6261-
version "0.13.3"
6262-
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
6263-
integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
6264-
62656252
regenerator-transform@^0.10.0:
62666253
version "0.10.1"
62676254
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"

0 commit comments

Comments
 (0)