Obfuscation presets available in Perl Obfuscator GUI

Quick navigation:


Available presets for code mangling:

Original code (before protection):
my  $error_level  =  4;  #  error  level  to  show  alerts  for
sub  log_error
{
        my  ($whereStr,$msg)  =  @_;
        log_common(3,"error:$whereStr",$msg);  #call  common  function
}
sub  log_common
{
        my  ($lvl,$whereStr,$msg)  =  @_;
        my  $buf  =  '<div  class=logitem>'  .  asctime(localtime(time()))  .  $whereStr  .
                  $msg  .  '</div>';
        print  STDERR  $buf  if  $lvl  >=  $error_level;
        print  ALLLOG  $buf;
}
This is a trivial piece of Perl code with 1 global var, 2 subs that refer to it and have local variables or parameters of the same name.

 

Mode testing - recommended for stage 1:
no  warnings;
(my  $ReplacementFor_error_level  =  4);
sub  ReplacementFor_log_error  {
        no  warnings;
        (my($ReplacementFor_whereStr,  $ReplacementFor_msg)  =  @_);
        ReplacementFor_log_common(3,  ('error:'  .  $ReplacementFor_whereStr),  $ReplacementFor_msg);
}
sub  ReplacementFor_log_common  {
        no  warnings;
        (my($ReplacementFor_lvl,  $ReplacementFor_whereStr,  $ReplacementFor_msg)  =  @_);
        (my  $ReplacementFor_buf  =  (((('<div  class=logitem>'  .  ReplacementFor_asctime(localtime(time)))  .  $ReplacementFor_whereStr)  .  $ReplacementFor_msg)  .  '</div>'));
        (($ReplacementFor_lvl  >=  $ReplacementFor_error_level)  and  print(STDERR  $ReplacementFor_buf));
        print(ReplacementFor_ALLLOG  $ReplacementFor_buf);
}

Whitespaces are not jammed, so line numbers should be same as in original code. Symbols that will be renamed get ReplacementFor_ prefix. Best mode for preparation your code for protection and testing protected output.
    Details

This preset is ideal for preparing your code for protection and testing protected code:
  • Line numbers in protected code should match ones in original code;
  • Whitespaces are not jammed in code;
  • Comments are replaced with same number of newlines;
  • encoding, integer and string mangling are turned off;
  • symbols that will be replaced with unreadable names in production mode will get prefix "ReplacementFor_" when using this mode.

WHEN TO USE: This preset is for stage when you just prepare your code for protection, mostly when you collect names of symbols that can't be changed. Using this preset allows to receive informative error messages from compilers/interpreters your code is written for.
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...
Mode testing - recommended for stage 2 (same as stage 1 + whitespace jamming enabled):
no  warnings;(my  $ReplacementFor_error_level=4);sub  ReplacementFor_log_error{no 
warnings;(my  ($ReplacementFor_whereStr,$ReplacementFor_msg)=@_);
ReplacementFor_log_common  (3,('error:'.$ReplacementFor_whereStr),
$ReplacementFor_msg);}sub  ReplacementFor_log_common{no  warnings;(my  (
$ReplacementFor_lvl,$ReplacementFor_whereStr,$ReplacementFor_msg)=@_);(my  $ReplacementFor_buf
=(((('<div  class=logitem>'.ReplacementFor_asctime  (localtime  (time))).
$ReplacementFor_whereStr).$ReplacementFor_msg).'</div>'));(($ReplacementFor_lvl
>=$ReplacementFor_error_level)and  print  (STDERR  $ReplacementFor_buf));print  (ReplacementFor_ALLLOG
  $ReplacementFor_buf);}
Whitespaces are jammed. Symbols that will be renamed get ReplacementFor_ prefix. Prepare your code for protection using this mode too after testing it protected with previous mode to check whether removal of line breaks will affect your code (it should not!! but it would be easier to detect the problem caused by newline removal using this preset rather than production presets).
    Details

These presets are optimized for preparing your code for protection:
  • Whitespaces are jammed in the code;
  • Comments are removed;
  • encoding, integer and string mangling are turned off so you get informative error messages from compilers/interpreters;
  • symbols that will be replaced with unreadable names in production mode will get prefix "ReplacementFor_" when using this mode.
WHEN TO USE: This preset is for stage when you've finished preparing your code for protection and wish to try it protected with jamming enabled. Jamming spaces and removal of comments is unlikely to create issues, but it's better to test how jammed code works by trying this preset first. If your code works with this preset, it's safe to use any of production presets here.
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...
Mode lite protection - protect everything but leave symbol names as is:
no  warnings;(my  $error_level=(0x13b0+  2878-0x1eea));sub  log_error{no  warnings;(my  (
$whereStr,$msg)=@_);log_common  ((0x0474+  3847-0x1378),(
"\x65\x72\x72\x6f\x72\x3a".$whereStr),$msg);}sub  log_common{no  warnings;(my  (
$lvl,$whereStr,$msg)=@_);(my  $buf=((((
"\x3c\x64\x69\x76\x20\x63\x6c\x61\x73\x73\x3d\x6c\x6f\x67\x69\x74\x65\x6d\x3e".
asctime  (localtime  (time))).$whereStr).$msg)."\x3c\x2f\x64\x69\x76\x3e"));(($lvl
>=$error_level)and  print  (STDERR  $buf));print  (ALLLOG  $buf);}
No symbol names are changed. Comments are removed, whitespace is jammed. String and integer constants are obfuscated.This can be used when you don't have time to test your code afer obfuscation at all; the code after obfuscation should work exactly as before obfuscation.
    Details

When this preset is selected, all obfuscation stages except renaming of symbols are performed:
  • comments are removed
  • whitespaces are jammed
  • strings and integers are mangled
WHEN TO USE: When this preset is selected, symbol names are not changed. This means there is no need to compose list of exceptions (names of symbols that can't be changed) and test whether code works afterwards. Since gathering exceptions is most time-consuming part, use of this mode allows to get some protection very quickly. Output should work exactly the same as original code, so extensive testing of protected code is not required.
PLEASE NOTE When this mode is selected, it's still possible to use asserters for licensing conditions (expiration, binding to domain name and user-implemented asserters).
Please note Your file will be transformed into some equivalent form - a lot of parenthesis inserted, some expressions simplified - since some parsing and transformation will still be performed. Due to these transformations and bugs in Perl interpreter there is a small chance that your code will fail to run. If you need to just encode your Perl file without ever testing result, use preset named "do not parse source at all and do not change it" - your code won't even be parsed (and thus won't be transformed at all) and even comments in your code will be preserved. Though we don't recommend to base protection of your code only on encoding since it's possible to reverse by spending considerable time.
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...
Mode lite protection - just remove comments, do not change anything else:
no  warnings;
(my  $error_level  =  4);
sub  log_error  {
        no  warnings;
        (my($whereStr,  $msg)  =  @_);
        log_common(3,  ('error:'  .  $whereStr),  $msg);
}
sub  log_common  {
        no  warnings;
        (my($lvl,  $whereStr,  $msg)  =  @_);
        (my  $buf  =  (((('<div  class=logitem>'  .  asctime(localtime(time)))  .  $whereStr)  .  $msg)  .  '</div>'));
        (($lvl  >=  $error_level)  and  print(STDERR  $buf));
        print(ALLLOG  $buf);
}

Only comments are removed, nothing else is changed.
    Details

When this preset is applied, only comments are removed. No obfuscation and no whitespace jamming is performed.
WHEN TO USE: This is useful if you wish to just remove comments (and possibly encode file afterwards) without spending any time and effort for preparing your project for obfuscation (i.e. collecting symbol names that can't be changed)
PLEASE NOTE It's impossible to use licensing conditions asserters when using this preset.
PLEASE NOTE:"do not parse source at all and do not change it" - your code won't even be parsed (and thus won't be transformed at all) and even comments in your code will be preserved. Though we don't recommend to base protection of your code only on encoding since it's possible to reverse by spending considerable time.
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...
Mode lite protection - do not parse source at all and do not change it:
my  $error_level  =  4;  #  error  level  to  show  alerts  for
sub  log_error
{
        my  ($whereStr,$msg)  =  @_;
        log_common(3,"error:$whereStr",$msg);  #call  common  function
}
sub  log_common
{
        my  ($lvl,$whereStr,$msg)  =  @_;
        my  $buf  =  '<div  class=logitem>'  .  asctime(localtime(time()))  .  $whereStr  .
                  $msg  .  '</div>';
        print  STDERR  $buf  if  $lvl  >=  $error_level;
        print  ALLLOG  $buf;
}

Code is same as original (i.e. it's not changed). This mode is useful if you plan to apply encoding to the code - as a result, your code won't be readable and you won't have to test it. We don't recommend you to use this mode anyway, even if you enable encoding for the code.
    Details

No parsing and no transformation are performed (i.e. no jamming, no comment removal, no symbol renaming, no string and number obfuscation).

Asserters (binding to domain name, expiration and user-implemented licensing conditions validation) offer only weak protection when this mode is selected.

WHEN TO USE:This mode is useful only if you wish to just encode your files. This will "hide" your code, but protection won't be irreversable. Apply this mode if you don't have time to prepare code for obfuscation.
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...
Mode production - md5 engine for all symbols:
no  warnings;(my  $zfafb4b3d80=(0x125a+  395-0x13e1));sub  z9fe5826ce8{no  warnings;(my  (
$zce55a28aab,$zea4cd01646)=@_);za56048cb23  ((0x05b7+  6823-0x205b),(
"\x65\x72\x72\x6f\x72\x3a".$zce55a28aab),$zea4cd01646);}sub  za56048cb23{no 
warnings;(my  ($z0799d4fdb1,$zce55a28aab,$zea4cd01646)=@_);(my  $z1f7dba04b5=((((
"\x3c\x64\x69\x76\x20\x63\x6c\x61\x73\x73\x3d\x6c\x6f\x67\x69\x74\x65\x6d\x3e".
z7f5885ba5b  (localtime  (time))).$zce55a28aab).$zea4cd01646).
"\x3c\x2f\x64\x69\x76\x3e"));(($z0799d4fdb1>=$zfafb4b3d80)and  print  (STDERR 
$z1f7dba04b5));print  (zcc4dfcd3e7  $z1f7dba04b5);}
Production mode with md5 mangler for all symbols. Comments are removed, whitespace is jammed, strings and integers are mangled too.
    Details

This is a default preset for production.
  • All symbols are replaced with their md5 hash (with some seed) if using non-trial version (in trial version, all symbols will be just prefixed with a string "ReplacementFor_")
  • encoding is enabled (if encoding-related preset permits encoding)
  • integer and string mangling is on
  • comments are removed.
  • whitespaces are jammed everywhere.
PLEASE NOTE: In trial edition all symbols will be just prefixed with a string "ReplacementFor_" !! Once you purchase a product from the store, real symbol obfuscation will be performed without need to edit or test your project.
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...
Mode production - replace symbols with "lI":
no  warnings;(my  $IlIll=(0x0927+  5790-0x1fc1));sub  lllIl{no  warnings;(my  ($Illll,
$IIlll)=@_);llIIl  ((0x2051+  960-0x240e),("\x65\x72\x72\x6f\x72\x3a".$Illll),
$IIlll);}sub  llIIl{no  warnings;(my  ($IIIll,$Illll,$IIlll)=@_);(my  $lIlIl=((((
"\x3c\x64\x69\x76\x20\x63\x6c\x61\x73\x73\x3d\x6c\x6f\x67\x69\x74\x65\x6d\x3e".
IlIIl  (localtime  (time))).$Illll).$IIlll)."\x3c\x2f\x64\x69\x76\x3e"));(($IIIll
>=$IlIll)and  print  (STDERR  $lIlIl));print  (lIIlI  $lIlIl);}
Production mode with mangler that turns all symbols into names like IIlIllI. Comments are removed, whitespace is jammed, strings and integers are mangled too.
    Details

  • All symbols are replaced with combinations of 'I' and 'l' (e.g. "lIIIl") if using non-trial version (with trial version, all symbols will be just prefixed with a string "ReplacementFor_")
  • encoding is enabled (if encoding-related preset permits encoding)
  • integer and string mangling is on
  • comments are removed.
  • whitespaces are jammed everywhere.
PLEASE NOTE: In trial edition all symbols will be just prefixed with a string "ReplacementFor_" !! Once you purchase a product from the store, real symbol obfuscation will be performed without need to edit or test your project.
PLEASE NOTE: Note: this mode won't work in Lite edition of Perl-Obfus!
It's not recommended to change ANY setting in this mode except settings in section "Obfuscation engines' options"!

Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE'.

Mode production - minimize size of output:
no  warnings;(my  $l=4);sub  F{no  warnings;(my  ($T,$M)=@_);g  (3,('error:'.$T),$M);}
sub  g{no  warnings;(my  ($h,$T,$M)=@_);(my  $W=(((('<div  class=logitem>'.E  (
localtime  (time))).$T).$M).'</div>'));(($h>=$l)and  print  (STDERR  $W));print  (G 
$W);}
All symbols get shortest name possible (though without considering their scope). Comments are removed, whitespace is jammed, integer and string constants are left as is.
    Details

When this mode is applied, the output will have minimal size:
  • all symbols are given shortest name possible if using non-trial version (with trial version, all symbols will be just prefixed with a string "ReplacementFor_")
  • encoding is disabled
  • integer and string mangling is NOT performed
  • comments are removed
  • whitespaces are jammed
PLEASE NOTE: In trial edition all symbols will be just prefixed with a string "ReplacementFor_" !! Once you purchase a product from the store, real symbol obfuscation will be performed without need to edit or test your project again.
PLEASE NOTE: Note: this mode won't work in Lite edition of Perl-Obfus!
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...
Mode production - replace symbols with permutations of characters:
no  warnings;(my  $DZHaK=(0x16d5+  151-0x1768));sub  XBKsI{no  warnings;(my  ($JYzmG,
$kDE_R)=@_);FlSo0  ((0x0558+  4461-0x16c2),("\x65\x72\x72\x6f\x72\x3a".$JYzmG),
$kDE_R);}sub  FlSo0{no  warnings;(my  ($_IvSX,$JYzmG,$kDE_R)=@_);(my  $EOYDW=((((
"\x3c\x64\x69\x76\x20\x63\x6c\x61\x73\x73\x3d\x6c\x6f\x67\x69\x74\x65\x6d\x3e".
Zl_Jw  (localtime  (time))).$JYzmG).$kDE_R)."\x3c\x2f\x64\x69\x76\x3e"));(($_IvSX
>=$DZHaK)and  print  (STDERR  $EOYDW));print  (pYxll  $EOYDW);}
Production mode with "combs" mangler for all symbols (turning each symbol into combination of characters). Comments are removed, whitespace is jammed, strings and integers are mangled too.
    Details

When this mode is applied, the output all symbols will become random permuations of all characters possible for identifier (looking more random compared to default md5 engine). No disadvantages compared to preset that uses md5!
  • all symbols are given names consisting random set of characters, not only characters that can be used in hex digit if using non-trial version (in trial version, all symbols will be just prefixed with a string "ReplacementFor_")
  • encoding is disabled
  • integer and string mangling is NOT performed
  • comments are removed
  • whitespace is jammed
PLEASE NOTE: In trial edition all symbols will be just prefixed with a string "ReplacementFor_" !! Once you purchase a product from the store, real symbol obfuscation will be performed without need to edit your project.
PLEASE NOTE: Note: this mode won't work in Lite edition of Perl-Obfus!
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...

Available presets for encoding of code:

Original code (before protection):
my  $error_level  =  4;  #  error  level  to  show  alerts  for
sub  log_error
{
        my  ($whereStr,$msg)  =  @_;
        log_common(3,"error:$whereStr",$msg);  #call  common  function
}
sub  log_common
{
        my  ($lvl,$whereStr,$msg)  =  @_;
        my  $buf  =  '<div  class=logitem>'  .  asctime(localtime(time()))  .  $whereStr  .
                  $msg  .  '</div>';
        print  STDERR  $buf  if  $lvl  >=  $error_level;
        print  ALLLOG  $buf;
}
Just a perl file.

 

Mode no encoding:
no  warnings;(my  $zfafb4b3d80=(0x1248+  1502-0x1822));sub  z9fe5826ce8{no  warnings;
(my  ($zce55a28aab,$zea4cd01646)=@_);za56048cb23  ((0x11b5+  5440-0x26f2),(
"\x65\x72\x72\x6f\x72\x3a".$zce55a28aab),$zea4cd01646);}sub  za56048cb23{no 
warnings;(my  ($z0799d4fdb1,$zce55a28aab,$zea4cd01646)=@_);(my  $z1f7dba04b5=((((
"\x3c\x64\x69\x76\x20\x63\x6c\x61\x73\x73\x3d\x6c\x6f\x67\x69\x74\x65\x6d\x3e".
z7f5885ba5b  (localtime  (time))).$zce55a28aab).$zea4cd01646).
"\x3c\x2f\x64\x69\x76\x3e"));(($z0799d4fdb1>=$zfafb4b3d80)and  print  (STDERR 
$z1f7dba04b5));print  (zcc4dfcd3e7  $z1f7dba04b5);}
No encoding at all.
    Details

This mode turns off encoding for files of all kinds.
It's not recommended to change ANY setting in this mode!
Apply all your common settings like name of file with headers and footers to add, etc to the mode with title 'BASE' and in preset selected using Settings ⇒ Select preset for code mangling...
Mode default encoding options:
Most recommended options for encoding.
    Details

More samples of Perl obfuscation

See another page with samples of obfuscated Perl files.