question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Excluding blocks from Obfuscation

See original GitHub issue

Hi,

Is there a way to exclude a block of code from obfuscation?

For Example:

StringFormat = function(format) {
	var args = Array.prototype.slice.call(arguments, 1);
	return format.replace(/{(\d+)}/g, function(match, number) { 
		return typeof args[number] != 'undefined'
		? args[number] 
		: match
	  ;
	});
};

The code above is not working after obfuscation with the following settings:

 {
            compact: true,
            controlFlowFlattening: true,
            controlFlowFlatteningThreshold: 1,
            deadCodeInjection: true,
            deadCodeInjectionThreshold: 1,
            debugProtection: false,
            debugProtectionInterval: false,
            disableConsoleOutput: false,
            mangle: false,
            rotateStringArray: true,
            selfDefending: true,
            stringArray: true,
            stringArrayEncoding: 'rc4',
            stringArrayThreshold: 1,
            unicodeEscapeSequence: false
    }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Friedchicken007commented, May 23, 2017

Hmmz, I should have seen that one! Thanks. Confirmed working on my side.

0reactions
lock[bot]commented, Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to stop proguard from obfuscating entire package?
the answer is "Yes", to prevent package-private member obfuscation you must add a new line in the block, *; What a user-hateful abomination....
Read more >
What is obfuscation and how does it work? - TechTarget
Obfuscation means to make something difficult to understand. Programming code is often obfuscated to protect intellectual property or trade secrets, ...
Read more >
Attack surface reduction (ASR) rules reference - Microsoft Learn
Attack surface reduction rules by type ; Block executable files from running unless they meet a prevalence, age, or trusted list criterion, Yes....
Read more >
Shrink, obfuscate, and optimize your app - Android Developers
When enabling shrinking, you also benefit from obfuscation, which shortens the names of your app's classes and members, and optimization, which applies more ......
Read more >
VPN Obfuscation Explained: How to Bypass VPN Blocks in 2022
Learn how to use obfuscated servers and stealth protocols to bypass VPN blocks and access the internet. The best and most reliable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found