Written quickly to solve a puzzle in a CTF.
Another competitor came up with a much nicer way to display the output as it was revealed - it wasn't immediately obvious to me how long the flag was going to be, but it looked like it'd be 30-40 characters, so I figured that collecting 200 characters should get me what I needed without grinding on the server unnecessarily. It worked, in a not very elegant sort of way.
Note that I ended up not using the rot() function at all, rot_alpha() ended up doing all of the work. I don't remember why I started going one direction then went the other, it just turned out that way.
In retrospect I'm not sure why I thought it was better to create all 26 possible rot() variations then search them, instead of generating and checking one at a time. Another "it made sense at the time" thing.