Skip to content

Commit 3106e5e

Browse files
authored
Merge pull request #61 from PropGit/Remove_Obfuscation
Remove obfuscation
2 parents 2cc205b + 0cfc05c commit 3106e5e

File tree

12 files changed

+78
-184
lines changed

12 files changed

+78
-184
lines changed

LICENSE

Lines changed: 54 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22
******** License for http.js ********
33
*************************************
44

5-
// Copyright 2013 The Chromium Authors. All rights reserved.
6-
//
7-
// Redistribution and use in source and binary forms, with or without
8-
// modification, are permitted provided that the following conditions are
9-
// met:
10-
//
11-
// * Redistributions of source code must retain the above copyright
12-
// notice, this list of conditions and the following disclaimer.
13-
// * Redistributions in binary form must reproduce the above
14-
// copyright notice, this list of conditions and the following disclaimer
15-
// in the documentation and/or other materials provided with the
16-
// distribution.
17-
// * Neither the name of Google Inc. nor the names of its
18-
// contributors may be used to endorse or promote products derived from
19-
// this software without specific prior written permission.
20-
//
21-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5+
Copyright 2013 The Chromium Authors. All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without
8+
modification, are permitted provided that the following conditions are
9+
met:
10+
11+
* Redistributions of source code must retain the above copyright
12+
notice, this list of conditions and the following disclaimer.
13+
* Redistributions in binary form must reproduce the above
14+
copyright notice, this list of conditions and the following disclaimer
15+
in the documentation and/or other materials provided with the
16+
distribution.
17+
* Neither the name of Google Inc. nor the names of its
18+
contributors may be used to endorse or promote products derived from
19+
this software without specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232

3333

3434

@@ -45,6 +45,31 @@ See sha1.js file and license at http://www.apache.org/licenses/LICENSE-2.0
4545
*************************************
4646

4747
All other project source code, unless indicated by the code itself, is
48-
copyright (c) Parallax Inc. and is proprietary. See statement in the
49-
respective source code file(s).
48+
copyright (c) 2019 Parallax Inc.
49+
50+
Redistribution and use in source and binary forms, with or without
51+
modification, are permitted provided that the following conditions are
52+
met:
53+
54+
* Redistributions of source code must retain the above copyright
55+
notice, this list of conditions and the following disclaimer.
56+
* Redistributions in binary form must reproduce the above
57+
copyright notice, this list of conditions and the following disclaimer
58+
in the documentation and/or other materials provided with the
59+
distribution.
60+
* Neither the name of Parallax Inc. nor the names of its
61+
contributors may be used to endorse or promote products derived from
62+
this software without specific prior written permission.
63+
64+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
65+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
66+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
67+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
68+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
69+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
70+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
71+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
72+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
73+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
74+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5075

MakeRelease

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,30 @@
11
echo
2-
echo ---Making Obfuscated Chrome App release in ./release folder---
2+
echo ---Making Chrome App release in ./release folder---
33
echo
4-
echo STEP 1 of 3: Clearing ./release folder
4+
echo STEP 1 of 2: Clearing ./release folder
55
echo
66
# Clear release folder
77
rm -R release/*
88

9-
echo STEP 2 of 3: Generating obfuscated source - automatically creating ./release folder if needed
10-
#
11-
# Options Notes:
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.
15-
#
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
23-
249
echo
25-
echo STEP 3 of 3: Copying static resources to ./release folder
10+
echo STEP 2 of 2: Copying static resources to ./release folder
2611
echo
2712
# Copy static resources
2813
cp -R assets release/assets
14+
cp background.js release/
2915
cp http.js release/
3016
cp index.css release/
3117
cp index.html release/
18+
cp index.js release/
3219
cp LICENSE release/
20+
cp loader.js release/
3321
cp manifest.json release/
3422
cp messages.js release/
23+
cp parser.js release/
24+
cp port.js release/
25+
cp serial.js release/
3526
cp sha1.js release/
27+
cp wx.js release/
3628

3729
echo Done!
3830

README.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,43 +26,17 @@ No build process is required- simply press the play button in Chrome Dev Editor
2626

2727
## Releasing
2828

29-
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._
29+
Though there is no need for a "build" process during development, the release process requires extra effort because certain files need be excluded from the release and the release set must be zipped up for packaging for the Chrome Web Store.
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.18.1_.
32-
- Requires (and can be installed with) Node.js.
33-
- Source repository and instructions: [https://github.com/javascript-obfuscator/javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator)
34-
- Live online version: [https://javascriptobfuscator.herokuapp.com/](https://javascriptobfuscator.herokuapp.com/)
35-
- Anyone can use the _Beautify_ option of the [UglifyJS Demo](http://lisperator.net/uglifyjs/) or the _Nicify Javascript_ option of [http://jsnice.org](http://jsnice.org) to test the effectiveness of (or circumvent) obfuscated code.
36-
- The only files needing obfuscation are: _background.js_, _index.js_, _parser.js_, and _serial.js_. All others should be unobscured.
31+
The following needs to be performed every time a release to the Chrome Web Store is needed.
3732

38-
39-
After performing _Set-Up for Code Obfuscation_ on the development system (usually just once), the release process itself consists of just the _Obfuscate & Release_ process.
40-
41-
42-
### Set-Up for Code Obfuscation
43-
44-
This is a system and workspace configuration step - usually performed only once per development system.
45-
46-
1. Install Node.js:
47-
- Tested with _Node.js v6.10.3 LTS_, installed via: [https://nodejs.org/dist/v6.10.3/node-v6.10.3-x64.msi](https://nodejs.org/dist/v6.10.3/node-v6.10.3-x64.msi)
48-
2. Switch to the repository's workspace:
49-
- ```$ cd path_to_BlocklyProp_Launcher/```
50-
3. Install _javascript-obfuscator_ using Node's package manager (npm):
51-
- ```$ npm install javascript-obfuscator```
52-
- This will create a subfolder in your workspace called _node_modules_ which contains many Node resources including _javascript-obfuscator_. This folder _should not_ be archived in repository commits, thus the repo's ```.gitignore``` file excludes the entire _node_modules_ folder.
53-
54-
55-
### Obfuscate & Release
56-
57-
This is a frequent operation to be performed every time a release to the Chrome Web Store is needed.
58-
59-
1. Create the _release_ fileset (with obfuscated Parallax JavaScript source code and unobscured public libraries):
33+
1. Create the _release_ fileset:
6034
1. Switch to the repository's workspace:
6135
- _IMPORTANT: On Windows platforms, open a Git Bash command window_
6236
- ```$ cd path_to_BlocklyProp_Launcher/```
6337
2. Run the _MakeRelease_ script
6438
- ```$ ./MakeRelease```
65-
- This will clean out (or create) the _release_ subfolder and will generate the obfuscated files plus the other unobscured resources necessary for a Chrome App package.
39+
- This will clean out (or create) the _release_ subfolder and will copy files into it for a Chrome App package.
6640
- This folder _should not_ be archived in repository commits, thus the repo's ```.gitignore``` file excludes the entire _release_ folder.
6741
2. Test the app by installing the _release_ subfolder contents (Load Unpackaged App from Chrome or the Chrome Apps & Extensions Developer Tool).
6842
3. Distribute the app by archiving (ZIP'ing) the _release_ subfolder contents (_not_ the folder; just its contents) and updating its Chrome Web Store publication.

background.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
/* Parallax Inc. ("PARALLAX") CONFIDENTIAL
2-
Unpublished Copyright (c) 2017 Parallax Inc., All Rights Reserved.
3-
4-
NOTICE: All information contained herein is, and remains the property of PARALLAX. The intellectual and technical concepts contained
5-
herein are proprietary to PARALLAX and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
6-
secret or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written
7-
permission is obtained from PARALLAX. Access to the source code contained herein is hereby forbidden to anyone except current PARALLAX
8-
employees, managers or contractors who have executed Confidentiality and Non-disclosure agreements explicitly covering such access.
9-
10-
The copyright notice above does not evidence any actual or intended publication or disclosure of this source code, which includes
11-
information that is confidential and/or proprietary, and is a trade secret, of PARALLAX. ANY REPRODUCTION, MODIFICATION, DISTRIBUTION,
12-
PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT THE EXPRESS WRITTEN CONSENT OF PARALLAX IS STRICTLY
13-
PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR
14-
RELATED INFORMATION DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, OR TO MANUFACTURE, USE, OR
15-
SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. */
1+
/* Copyright (c) 2019 Parallax Inc., All Rights Reserved. */
162

173
// Register listeners to create app window upon application launch and
184
// to close active serial ports upon application termination

index.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
/* Parallax Inc. ("PARALLAX") CONFIDENTIAL
2-
Unpublished Copyright (c) 2017 Parallax Inc., All Rights Reserved.
3-
4-
NOTICE: All information contained herein is, and remains the property of PARALLAX. The intellectual and technical concepts contained
5-
herein are proprietary to PARALLAX and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
6-
secret or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written
7-
permission is obtained from PARALLAX. Access to the source code contained herein is hereby forbidden to anyone except current PARALLAX
8-
employees, managers or contractors who have executed Confidentiality and Non-disclosure agreements explicitly covering such access.
9-
10-
The copyright notice above does not evidence any actual or intended publication or disclosure of this source code, which includes
11-
information that is confidential and/or proprietary, and is a trade secret, of PARALLAX. ANY REPRODUCTION, MODIFICATION, DISTRIBUTION,
12-
PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT THE EXPRESS WRITTEN CONSENT OF PARALLAX IS STRICTLY
13-
PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR
14-
RELATED INFORMATION DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, OR TO MANUFACTURE, USE, OR
15-
SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. */
1+
/* Copyright (c) 2019 Parallax Inc., All Rights Reserved. */
162

173

184
// TODO: allow user to change port and server IP/addr. Feilds and button are there, but no supporting code.

loader.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
1-
/* Parallax Inc. ("PARALLAX") CONFIDENTIAL
2-
/* Parallax Inc. ("PARALLAX") CONFIDENTIAL
3-
Unpublished Copyright (c) 2017 Parallax Inc., All Rights Reserved.
4-
5-
NOTICE: All information contained herein is, and remains the property of PARALLAX. The intellectual and technical concepts contained
6-
herein are proprietary to PARALLAX and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade
7-
secret or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written
8-
permission is obtained from PARALLAX. Access to the source code contained herein is hereby forbidden to anyone except current PARALLAX
9-
employees, managers or contractors who have executed Confidentiality and Non-disclosure agreements explicitly covering such access.
10-
11-
The copyright notice above does not evidence any actual or intended publication or disclosure of this source code, which includes
12-
information that is confidential and/or proprietary, and is a trade secret, of PARALLAX. ANY REPRODUCTION, MODIFICATION, DISTRIBUTION,
13-
PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT THE EXPRESS WRITTEN CONSENT OF PARALLAX IS STRICTLY
14-
PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR
15-
RELATED INFORMATION DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, OR TO MANUFACTURE, USE, OR
16-
SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. */
1+
/* Copyright (c) 2019 Parallax Inc., All Rights Reserved. */
172

183
// Programming metrics
194
let txData; //Data to transmit to the Propeller (size/contents created later)

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "BlocklyProp Launcher",
33
"description": "A Chrome application that connects your Propeller-Powered Hardware to the BlocklyProp website.",
4-
"version": "0.9.6",
4+
"version": "0.9.7",
55
"manifest_version": 2,
66
"minimum_chrome_version": "45",
77

messages.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* Copyright (c) 2019 Parallax Inc., All Rights Reserved. */
2+
13
/*
24
Notices
35

0 commit comments

Comments
 (0)