LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Please help me decipher this. (https://www.linuxquestions.org/questions/general-10/please-help-me-decipher-this-754166/)

Hko 09-17-2009 01:39 PM

Furhter investigation of this issue, made me conclude that the bug was in my input. Not my code.

So, once again:
Code:

bash$ cat garbled.txt
Doogsauumauipnt >)! Zov qatsfd!ovr!ieipt!fjlues >) Wiau brf zovr!tirfe!fbvprjtf uedhoidam copkt? Pmebsf jndlvdf bt!lfatt!ooe!spfuwbrf fnhioefrjnh copk- uhf ptiess!cbn!bf xhbtfvfr- j.f.- qhzsjct,!mbti,!euc/

bash$ cat wiau.c
main(){char i=0,_;while((_=getchar())>0)putchar((i=_-33?!i:1)?--_:_);}

bash$ make wiau
cc    wiau.c  -o wiau

bash$ ./wiau <garbled.txt
Congratulations =)  You passed our idiot filter =)What are your three favorite technical books?Please include at least one software engineering book, the others can be whatever, i.e., physics, math, etc.


GrapefruiTgirl 09-17-2009 02:08 PM

@ HKo -- very nice :)
Compact and efficient, with as you mention, the benefit of easily translating the next chunk of such nonsense without editing the source.

:cool:! Sasha

Dogs 09-21-2009 04:38 PM

Interesting thread...

jiml8 09-21-2009 11:11 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3687401)
@ HKo -- very nice :)
Compact and efficient, with as you mention, the benefit of easily translating the next chunk of such nonsense without editing the source.

:cool:! Sasha

Yeah, but he has an input file...

GrapefruiTgirl 09-21-2009 11:19 PM

Quote:

Originally Posted by jiml8 (Post 3692394)
Yeah, but he has an input file...

True.. How about this:

The original cipher is included within the executable, so that if nothing is presented to stdin, and no file is given to it, it spews out the built-in cipher :D

Dinithion 09-22-2009 02:39 PM

Interesting thread indeed. I laughed hard when someone actually made a lolcode solution. That was awesome! :)

slakmagik 09-23-2009 01:42 AM

Ditto. The lolcode was hilarious. As I said on the thread that linked me to this one, I can't thank everybody individually, but I rated the thread 5 stars - first time I felt compelled to rate a thread. Great stuff.

unclejed613 10-06-2009 08:11 PM

he didn't even notice after seeing the cleartext that every other letter was unencrypted....... definitely flunked for that job.....

seems to me i remember there was an early "desktop" computer that stored text data in a similar format..... can't remember if it was some kind of checksum thing or some proprietary file type so that files created with that format couldn't be read by other programs......long time ago..... maybe it was wordstar for CP/M?


All times are GMT -5. The time now is 04:11 PM.