Here's a better example (found at slashdot), not obfuscated code but underhanded code.
Its purpose (and it does do this) is:
Can you tell what this code does, HC?
Its purpose (and it does do this) is:
read a PPM file in ASCII (P3) format, scanned over the numbers, and zeroed out the redacted pixels in the most obvious way possible:
Code:
for(c = buf;*c;c++) { if(isdigit(*c)) { if(!ws) { // new number, increment location. ws = 1; x++; if(x >= width * 3) { y++; x = 0; } } if(x > rx * 3 && x <= (rx + rwidth) * 3 && y > ry && y < ry + rheight) putchar('0'); else putchar(*c); } else { ws = 0; putchar(*c); } }
Spoiler:
Comment