Created
October 8, 2020 11:31
-
-
Save ilyakurdyukov/58a597392b608e781a2f2400539eda03 to your computer and use it in GitHub Desktop.
An example of splitting a C program into separate characters.
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
#include <stdio.h> | |
#define X(a,b) a##b | |
#define x(a,b) X(a,b) | |
#define s(a) #a | |
x ( i , x ( n , t | |
) ) x ( m , x ( a | |
, x ( i , n ) ) ) | |
( ) { x ( p , x ( | |
r , x ( i , x ( n | |
, x ( t , f ) ) ) | |
) ) ( s ( H ) s ( | |
e ) s ( l ) s ( l | |
) s ( o ) s ( % ) | |
s ( c ) s ( W ) s | |
( o ) s ( r ) s ( | |
l ) s ( d ) s ( ! | |
) s ( % ) s ( c ) | |
, x ( 3 , 2 ) , x | |
( 1 , 0 ) ) ; ; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unobfuscated code is:
The space has a numeric value of 32 and the newline character is 10, both of them cannot be encoded in the same way as other characters.
The same problem should be expected with parentheses and commas when used in a string.