Skip to content
This repository was archived by the owner on May 18, 2021. It is now read-only.

Support jshint-style inline obfuscation options #10

Open
joevennix opened this issue Feb 11, 2015 · 1 comment
Open

Support jshint-style inline obfuscation options #10

joevennix opened this issue Feb 11, 2015 · 1 comment

Comments

@joevennix
Copy link
Contributor

It would be nice to declare in the code itself different options for obfuscation. For example:

/* jsobfu memory_sensitive: true */
for (var i = 0; i < 0x1337b33f; i++) {
  heapSprayChunk("AAAAA");
}
/* jsobfu memory_sensitive: false */
/* jsobfu enabled: false */
// this comment will be in the output
/* jsobfu enabled: true */
// this comment will not.
@joevennix
Copy link
Contributor Author

This turns out to be very hard to implement. Rkelly throws away context-specific details about comments (it preserves line number and char, but these are not so useful in a visitor-based transformer). The best plan I can think of (e.g., that does not involve adding a ton of edge cases everywhere) would involve forking rkelly and making it treat comments like a syntax node.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant