Can I confuse an ionic application? if so, how?

any corova application is just its own web view and www folder that contains all the functionality in javascript and css javascript, so the application is fully disclosed, how can I make it as difficult as possible for anyone who reads the application source code?

+4
source share
5 answers

You are really worried that my advice is using a professional service to protect your code. For example. Jscrambler

+3
source

, . cordova html, js css. : crypt file

+4

, angular, , , .

, , .

:

angular.module('app', []).controller(['$scope', function($scope) { 
   //code
}]);

- ngAnnotate, gulp task runner

var gulp = require('gulp');
var ngAnnotate = require('gulp-ng-annotate');
var concat = require('gulp-concat');
var uglify= require('gulp-uglify');

gulp.task('task1', function () {
   return gulp.src('src/js/*.js')
   .pipe(concat('bundle.js'))
   .pipe(ngAnnotate())
   .pipe(uglify())
   .pipe(gulp.dest('dist'));
});
0

- . npm https://www.npmjs.com/package/location-hide

<script src="test/folder/sample.js" type="text/javascript"></script>  
<link href="test/stylesheet/perfect-scrollbar.css" rel="stylesheet">

<script src="TNANIuTOLZfmLYwaPDIYhcZDVOWKodqYhysaTeQHFPDhYlDLCOtxZqYmkKAhaSwSgbsYOWlpBzVSBtMZKSfwRqvPSqWVlBBuzHR" type="text/javascript"></script>  
<link href="gyXeFnOEvZbgTjLvdZRnsyrfhaXqffkDjcdATTouqpIenCalLRXKamuXEtiKbPGCsNrdQIaqTMTNWsLyLFuxygKytaruWzSjKYMq" rel="stylesheet">  

jquery, , javascript

$('[src=\'TNANIuTOLZfmLYwaPDIYhcZDVOWKodqYhysaTeQHFPDhYlDLCOtxZqYmkKAhaSwSgbsYOWlpBzVSBtMZKSfwRqvPSqWVlBBuzHR\']').attr("src", "test/folder/sample.js")  
$('[href=\'gyXeFnOEvZbgTjLvdZRnsyrfhaXqffkDjcdATTouqpIenCalLRXKamuXEtiKbPGCsNrdQIaqTMTNWsLyLFuxygKytaruWzSjKYMq\']').attr("src", "test/stylesheet/perfect-scrollbar.css") 

javascript js. ,

<script src="./allinone_external_file.js" type="text/javascript"></script>

htaccess, . script , . js . +, . , , javascript. , , , , jquery, , . .

0
source

I recommend using the babili library ( https://github.com/babel/babili ) and build your application so that the distribution using the electron is made from obfuscation of the code not from the source.

For example, package.json contains such scripts:

"main": "release/app.js",
"scripts": {
    "debug": "node ./node_modules/electron/cli.js ./app/app.js",
    "build": "./node_modules/.bin/babili app -d release -D",
    "test": "./node_modules/.bin/electron ./release/app.js",
    "pack": "./node_modules/.bin/build --dir --ia32"
  }

.babelrc

{
  "presets": ["es2015"]
}

BTW babel also supports ES6 / 7 obfuscation

0
source

Source: https://habr.com/ru/post/1609196/


All Articles