|
7 | 7 | rm -R release/*
|
8 | 8 |
|
9 | 9 | echo STEP 2 of 3: Generating obfuscated source - automatically creating ./release folder if needed
|
10 |
| -echo |
11 | 10 | #
|
12 | 11 | # 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. |
17 | 15 | #
|
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 |
| 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 |
22 | 23 |
|
| 24 | +echo |
23 | 25 | echo STEP 3 of 3: Copying static resources to ./release folder
|
24 | 26 | echo
|
25 | 27 | # Copy static resources
|
|
0 commit comments