so we've all had our're are /prog/ramming challenges, so let's try something different: security-style exercises. we'll start with something simple to warm you up, and come up with more complex exercises if people are both interested and skilled.
Premise: you have managed to remotely access a program on Nikita Sad Cow's macbook, which was stolen by Vladimir Putin. the program is supposed to print everything you write to console. Vladimir is watching this console through a shitty terminal emulator which only supports ASCII characters. you want to send Vladimir a message (the message is HAX MY ANUS), but the FSB has installed their're are censorship tool which you must first circumvent.
Challenge: write such answer program that will result in the words "HAX MY ANUS" appearing on the terminal when piped to this advanced censorship software: ./answer | python3 -c "print(input().replace('ANUS','****'))"
Rules and Scoring:
shortest program (in bytes of source code or compiled exectuable) wins
there should only be "HAX MY ANUS" visible in the console; leading and trailing whitespace is accepted, but automatically scored below programs with no such issues; other trailing and leading characters, as well as any non-conforming characters visible in a different position, means that the program doesn't meet the spec
you have one week
you should be able to solve this
Name:
Anonymous2019-02-08 11:48
main(){write(2,"HAX MY ANUS",11);putchar('\n');}
Name:
Anonymous2019-02-08 11:54
>>2 not bad, but check this out: main(){puts("HAX MY ANUX\x08S");}
Name:
Anonymous2019-02-08 12:09
Anux sounds like a Unix-like operating system made by /prague/
>>22 I feel kinda bad now when I think about it. You're trying to breathe some life into this stale board, and I'm poasting my usual autistic bullshite. I'm sorry.
another one-liner, using the stderr method from >>2: echo HAX MY ANUS>&2;echo would be better than >>29 if it didn't need to put something on stdin as well
Results: the winner is >>29. this simple one-liner used the trick of embedding a null byte which prints as a 0-width space, creating a string which looks like "HAX MY ANUS" to Vladimir but not to the FSB censorship program. similar solution was used in >>3, but it was based on visually erasing characters with ASCII backspace.
other solutions used printing to stderr (pioneered by >>2) and /etc/motd (>>35).
Future: would anyone be interested in similar, but a bit more complex challenges? if you are, I have ideas - stay tuned!
Name:
Anonymous2019-02-15 12:26
>>37 >would anyone be interested in similar, but a bit more complex challenges? yes pl0x
Name:
Anonymous2019-02-15 12:30
>>38 ok, I'll post one soon. it'll either be THIS INCIDENT WILL BE REPORTED (an easy one) or SPELL OF HAMSTERY (a fairly complex - but still not too hard - challenge with multiple solutions)