WiseLoop PHP Javascript Obfuscator 4.0.0
Anti-Theft Protection for JavaScript Source Code
wlJSOConfig Class Reference

Data Fields

 $DO_DECOY = true
 $DO_MINIFY = true
 $DO_LOCK_DOMAIN = true
 $DO_SCRAMBLE_VARS = true
 $ENCRYPTION_LEVEL = 1
 $SHOW_JS_LOCK_ALERTS = false
 $MSG_LOCK_DOMAIN = '"{JS}" works only on "{DOMAIN}".'
 $EXPIRATION_DATE = null
 $MSG_EXPIRED = '"{JS}" has expired on "{DATE}".'
 $CACHE_LEVEL = 2
 $SHOW_WISELOOP_SIGNATURE = false

Detailed Description

WiseLoop JavaScript Obfuscator Configuration class definition

Author:
WiseLoop

Field Documentation

$CACHE_LEVEL = 2

Type: int - enable cache to speed up the delivery. Acceptable values:

  • 0 - (not recommended) no cache: full processing is done on each request;
    This can be painfully slow on large JavaScript files and/or slow machines.
  • 1 - (recommended) the following processing results will be cached: domain locking, minifying, variable scrambling.
    This is the most common value: because the encryption is not cached, the obfuscation will benefit of all the features including the dynamic bytecode encryption.
    Please pay attention to large JavaScript files and/or slow machines: the encryption process can be quite slow on these ones.
    If the resulting speed is unsatisfactory, you may need to disable the dynamic bytecode encryption by setting the CACHE_LEVEL to value 2.
  • 2 - (recommended) the full processing result will be cached: domain locking, minifying, variable scrambling, encryption.
    Because the encryption result is also cached, this will disable the dynamic feature of encryption.
    This is the recommended value for large JavaScript files and/or slow machines.
    (recommended values: 1 or 2)
    See also:
    wlJSOCache
$DO_DECOY = true

Type: bool - if the obfuscator will perform HTTP request checking and generate bogus JavaScript code if direct scrapping attempts are detected.
(recommended value: TRUE)

See also:
wlJSODecoyer
$DO_LOCK_DOMAIN = true

Type: bool - if the obfuscator will lock the JavaScript source code to current domain only.
(recommended value: TRUE)

See also:
wlJSODomainLocker
$DO_MINIFY = true

Type: bool - if the obfuscator will perform code minification.
(recommended value: TRUE)

See also:
wlJSOMinifier
$DO_SCRAMBLE_VARS = true

Type: bool - if the obfuscator will obfuscate the declared variable names and functions inside the JavaScript source code.
(recommended value: TRUE)

See also:
wlJSOScrambler
$ENCRYPTION_LEVEL = 1

Type: int - specifies how hard the obfuscator will encrypt the JavaScript source code before delivery.
Zero means that no encryption will be performed.

Note:
  • Encryption enlarges payload sizes. The higher encryption level, the higher protection is achieved and the larger processed obfuscated code will result.
  • The browser needs valid JavaScript code to run, and the encrypted code is a valid JavaScript also. This is the reason that the encryption is made using a public key and a JavaScript boot loader function in order the be able to self-decrypt when the browser runs the encrypted code. There is no other way to make the encryption safer. If the browser manages to decrypt the encrypted code, also an ambitious thief can try this by using its own intelligence or some specialized tools.
    In conclusion, the encryption feature does not ensure bulletproof protection due to the public nature of JavaScript code.
    Keep in mind that all the world's obfuscation techniques are meant to discourage the code thief and cannot guarantee a full bulletproof protection against theft due to the public and open architecture of JavaScript and web browser combination.
    (recommended value: 1)
See also:
wlJSOEncryptor
$EXPIRATION_DATE = null

Type: string - the expiration date in yyyy-mm-dd format
If no expiration date is desired to be set, then set it to null.

See also:
$MSG_EXPIRED, wlJSOExpirator
$MSG_EXPIRED = '"{JS}" has expired on "{DATE}".'

Type: string - the alert message template when the expire.
{JS} and {DATE} will be replaced with their corresponding real values: the JavaScript filename and the expiration date.

See also:
$SHOW_JS_LOCK_ALERTS, $EXPIRATION_DATE, wlJSOExpirator
$MSG_LOCK_DOMAIN = '"{JS}" works only on "{DOMAIN}".'

Type: string - the alert message template when the script is copied on another internet domain and the lock domain setting is on.
{JS} and {DOMAIN} will be replaced with their corresponding real values: the JavaScript filename and the valid internet domain.

See also:
$SHOW_JS_LOCK_ALERTS
$SHOW_JS_LOCK_ALERTS = false

Type: bool - specifies if the explaining alert messages will be shown when the script expires or it runs on another internet domain and the lock domain setting is on.
Set this to FALSE so that the attacker will not know what's happening.
(recommended value: FALSE)

See also:
$MSG_LOCK_DOMAIN, $MSG_EXPIRED
$SHOW_WISELOOP_SIGNATURE = false

Type: bool - if set to true, the returned obfuscated JavaScript code will begin with a comment containing the WiseLoop's signature.
(recommended value: FALSE)


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables