3 ms·
When you need to prevent quick grepping in Java, you can also take advantage of the fact that unicode escapes can occur everywhere in a java file, not only with
by yonran 11y ago
When you need to prevent quick grepping in Java, you can also take advantage of the fact that unicode escapes can occur everywhere in a java file, not only within quotes. So you can declare an int by writing “\u0069\u006e\u0074 \u0069 = 1;” (equivalent to “int i = 1;”)
- tatterdemalion 11y agoWhy not \u0069\u006e\u0074\u0020\u0069\u0020\u003d\u0020\u0031\u003b ?
- reitzensteinm 11y agoIt's important to use this sparingly. When grepping is obviously broken, the adversary will adapt, most likely by writing a script to rewrite the Unicode, then it's back to business as usual. On the other hand, if grep has a 95% success rate, the adversary may well never notice, and build his or her mental model of the program on flawed understanding. That's when the real fun begins.
- 2muchcoffeeman 11y agoThis is why I turn on spell check in Idea and fix spellings.
- zvrba 11y agoAn IDE should tackle this w/o any problem.