Skip to content

Commit 53a9d15

Browse files
committed
[Requires v0.18.1+ of javascript-obfuscator. Found that v0.9.4 of javascript-obfuscator tool causes bug in socket code within serial.js. Updated to v0.18.1 (on dev box; not included in repository) and updated MakeRelease to use javascript-obfuscator's new CLI options.
1 parent 8327741 commit 53a9d15

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

MakeRelease

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ echo
77
rm -R release/*
88

99
echo STEP 2 of 3: Generating obfuscated source - automatically creating ./release folder if needed
10-
echo
1110
#
1211
# Options Notes:
13-
# disableConsoleOutput - causes the Chrome App to fail to launch (on background.js) or refuse to evaluate statements (parser.js and presumably others). It must be set 'false' to prevent this.
14-
# rotateStringArray - set to false on small files, true on large files. This makes it harder to determine the order of strings, but on small files the inserted helper function can attact attention.
15-
# stringArrayEncode - further obscures strings by base-64 (or rc4) encoding them, but slows down execution by up to 50%. It also breaks the Chrome App when true; set to false.
16-
# mangle - obfuscates variable names. In practice, it doesn't obfuscate all of them, but it doesn't hurt to have it enabled.
12+
# disable-console-output - causes the Chrome App to fail to launch (on background.js) or refuse to evaluate statements (parser.js and presumably others). It must be set 'false' to prevent this.
13+
# rotate-string-array - set to false on small files, true on large files. This makes it harder to determine the order of strings, but on small files the inserted helper function can attact attention.
14+
# string-array-encoding - further obscures strings by base-64 (or rc4) encoding them, but slows down execution by up to 50%. It also breaks the Chrome App when true; set to false.
1715
#
18-
./node_modules/javascript-obfuscator/bin/javascript-obfuscator.js background.js --output release/background.js --disableConsoleOutput false --compact true --stringArray true --rotateStringArray false --stringArrayEncoding false --mangle true --selfDefending true
19-
./node_modules/javascript-obfuscator/bin/javascript-obfuscator.js index.js --output release/index.js --disableConsoleOutput false --compact true --stringArray true --rotateStringArray true --stringArrayEncoding false --mangle true --selfDefending true
20-
./node_modules/javascript-obfuscator/bin/javascript-obfuscator.js parser.js --output release/parser.js --disableConsoleOutput false --compact true --stringArray true --rotateStringArray false --stringArrayEncoding false --mangle true --selfDefending true
21-
./node_modules/javascript-obfuscator/bin/javascript-obfuscator.js serial.js --output release/serial.js --disableConsoleOutput false --compact true --stringArray true --rotateStringArray true --stringArrayEncoding false --mangle true --selfDefending true
22-
./node_modules/javascript-obfuscator/bin/javascript-obfuscator.js wx.js --output release/wx.js --disableConsoleOutput false --compact true --stringArray true --rotateStringArray false --stringArrayEncoding false --mangle true --selfDefending true
16+
./node_modules/javascript-obfuscator/bin/javascript-obfuscator background.js --output release/background.js --disable-console-output false --compact true --identifier-names-generator hexadecimal --identifiers-prefix "" --string-array true --rotate-string-array false --string-array-encoding false --self-defending true
17+
./node_modules/javascript-obfuscator/bin/javascript-obfuscator index.js --output release/index.js --disable-console-output false --compact true --identifier-names-generator hexadecimal --identifiers-prefix "" --string-array true --rotate-string-array true --string-array-encoding false --self-defending true
18+
./node_modules/javascript-obfuscator/bin/javascript-obfuscator loader.js --output release/loader.js --disable-console-output false --compact true --identifier-names-generator hexadecimal --identifiers-prefix "" --string-array true --rotate-string-array true --string-array-encoding false --self-defending true
19+
./node_modules/javascript-obfuscator/bin/javascript-obfuscator parser.js --output release/parser.js --disable-console-output false --compact true --identifier-names-generator hexadecimal --identifiers-prefix "" --string-array true --rotate-string-array false --string-array-encoding false --self-defending true
20+
./node_modules/javascript-obfuscator/bin/javascript-obfuscator port.js --output release/port.js --disable-console-output false --compact true --identifier-names-generator hexadecimal --identifiers-prefix "" --string-array true --rotate-string-array false --string-array-encoding false --self-defending true
21+
./node_modules/javascript-obfuscator/bin/javascript-obfuscator serial.js --output release/serial.js --disable-console-output false --compact true --identifier-names-generator hexadecimal --identifiers-prefix "" --string-array true --rotate-string-array true --string-array-encoding false --self-defending true
22+
./node_modules/javascript-obfuscator/bin/javascript-obfuscator wx.js --output release/wx.js --disable-console-output false --compact true --identifier-names-generator hexadecimal --identifiers-prefix "" --string-array true --rotate-string-array false --string-array-encoding false --self-defending true
2323

24+
echo
2425
echo STEP 3 of 3: Copying static resources to ./release folder
2526
echo
2627
# Copy static resources

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ No build process is required- simply press the play button in Chrome Dev Editor
2828

2929
Though there is no need for a "build" process during development, the release process requires extra effort because this project is currently closed-source and since Chrome Applications are executing from source, the released application needs to have it's Parallax-created code obfuscated prior to publication. _Obfuscation is not really source code protection, but good obfuscation techniques can at least slow down reverse-engineering efforts._
3030

31-
- Releases of this Chrome App are source-code obfuscated with _javascript-obfuscator_ using the command-line (CLI) tools; currently tested with _javascript-obfuscator v0.9.4_.
31+
- Releases of this Chrome App are source-code obfuscated with _javascript-obfuscator_ using the command-line (CLI) tools; currently tested with _javascript-obfuscator v0.18.1_.
3232
- Requires (and can be installed with) Node.js.
3333
- Source repository and instructions: [https://github.com/javascript-obfuscator/javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator)
3434
- Live online version: [https://javascriptobfuscator.herokuapp.com/](https://javascriptobfuscator.herokuapp.com/)

0 commit comments

Comments
 (0)