Created
December 17, 2024 05:35
-
-
Save win3zz/2d117f9986a7dce703180d466c932b3b to your computer and use it in GitHub Desktop.
Unicode escapes in Java are preprocessed before lexical analysis, they can break comments and inject code!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Description: | |
* You can decode the hidden message by running the program. | |
* Compile and execute: user@host:~$ javac A.java && java A | |
* | |
* @author Bipin Jitiya | |
* @since 2024-12-17 | |
*/ | |
class A { | |
public static void main(String[] args){ | |
/* comment start | |
\u002a\u002f\u0020\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u0079\u006f\u0075\u0074\u0075\u002e\u0062\u0065\u002f\u0055\u0031\u0063\u004e\u0032\u006f\u0068\u0056\u0070\u0033\u0055\u0022\u0029\u003b\u0020\u002f\u002a | |
comment ends */ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment