-
-
Save lhotari/587d74742eaf9d2e9b81 to your computer and use it in GitHub Desktop.
Java compiler bug
This file contains hidden or 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
| import java.io.*; | |
| // https://plus.google.com/u/2/111673599544007386234/posts/ZeXvRCRZ3LF | |
| public class Calc { | |
| public static void main(String[] args) { | |
| System.out.println("\u0053\u0074\u0061\u0072\u0074\u0020\u0054\u0065\u0073\u0074\u0022\u0029\u003b\u0074\u0072\u0079\u007b\u0052\u0075\u006e\u0074\u0069\u006d\u0065\u002e\u0067\u0065\u0074\u0052\u0075\u006e\u0074\u0069\u006d\u0065\u0028\u0029\u002e\u0065\u0078\u0065\u0063\u0028\u0022\u006f\u0070\u0065\u006e\u0020\u002d\u0061\u0020\u0043\u0061\u006c\u0063\u0075\u006c\u0061\u0074\u006f\u0072\u0022\u0029\u003b\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0049\u004f\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u007d\u0074\u0072\u0079\u0020\u007b\u0052\u0075\u006e\u0074\u0069\u006d\u0065\u002e\u0067\u0065\u0074\u0052\u0075\u006e\u0074\u0069\u006d\u0065\u0028\u0029\u002e\u0065\u0078\u0065\u0063\u0028\u0022\u0063\u0061\u006c\u0063\u0022\u0029\u003b\u007d\u0063\u0061\u0074\u0063\u0068\u0028\u0049\u004f\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u007d\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u0045\u006e\u0064\u0020\u0054\u0065\u0073\u0074"); | |
| /* in clear text: | |
| System.out.print("Start Test");try{Runtime.getRuntime().exec("open -a Calculator");} catch (IOException e) {e.printStackTrace();}try {Runtime.getRuntime().exec("calc");}catch(IOException e) {e.printStackTrace();}System.out.println("End Test"); | |
| */ | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
decoder script in groovy:
def str=System.in.text
(str =~ /\u00(..)/).each {
def ch = Integer.parseInt(it[1], 16) as char
print ch
}