Tell me if I'm off-base...
Teachers often get put into boxes. If you have a math problem, you ask the math teacher. If you have a question about history, you ask the history teacher. If you want music, you ask the music teacher. But teachers don't end at their subjects; simply through living, people tend toward diversity of interests and abilities, and those often go unsung because the subject never really comes up.
Before I wanted to be a music teacher, I wanted to be a software engineer, and the decision to switch is another post altogether. Anyway, when I got this message the other day, I had to figure out what was up:
Hey ;) You have a secret crush.
Can you guess who it is??
Go Here to find out:
http://insert prefix here.blogspot.com
The URL naturally went to a phishing site, and the person from whom I got this had had her account compromised, and this was spread to the top half of her contact list, each person with their own prefix in the URL (just some junk characters).
Basically, it's been scrambled. The variable names have been obscured so as to not give hints of what's going on, and it's made to look as unreadable as possible. After some work in VI, though, it came to look like...
var w='rhsjluaenoakbkewrt', // a "key" for a lewis-carroll-like cipher
rb=0, // an index through var. w
i, // iterator for a loop
doc, // document to write at the end
percent='%', // something to hold the escape character
m='aqvngcwnsjhc', // why is this even getting initialized?
str='rjweepocopg', // does this do anything? red herring?
str2='sodjlhmmu', // does this do anything? red herring?
doc='', // initialize blank document?
bignumber, // big number to be catted to document? - actually, no
useless; // never initialized, just used... default=0?
for(i=0;i<longLen;i+=2) // work our way through 'long' 2 chars at a time
tmpchar=unescape(percent+long.substr(i,2)); // decode every two chars
base=tmpchar.charCodeAt(useless); // get unicode of tmpchar
m=str+str2; // concatenate? red herring?
power=w.charCodeAt(rb++); // get unicode of w
str=m+w; // concatonate? red herring?
bignumber=base^power; // bitwise operator?
doc+= String.fromCharCode(bignumber); // decode from unicode
if(rb>=lenW)rb=0; // reset counter for shorter 'key' string
} // for
document.write(doc); // write it to where?
Sorry, I lost the indenting... I don't think blogger lets you keep it.
bitwise xor operator and not an exponent function, but in the end, you get your message.
And what is this message? It turns out that what it gives the browser (because document.print() prints to the main frame, I think) is a small script to redirect the browser to another website. What was going on on that other website, though, will stay a mystery because before I could get back and grab the html from it, someone had taken it down and it just forwards to a 404 page for what sounds like the hosting server for a bunch of phishing scams.
The hunt ended there, but it was fun to try my hand again at code hacking. The last time I did anything like this, it was a port over to my old Mac LC-something, redoing the save system and getting rid of all the myriad gotos and parallel arrays in a really fun game done in C by Griffin Knodle called "Bad King," an early project of his. But getting those neurons firing again was just like getting back on an old bike; the syntax may have changed a little, but the process itself never really left me, and it was still as fun as ever.
So now for the question, you who either read all that or skipped down here : what gets put outside your box? What don't people expect you to do? Are you glad you're in this box rather than the other? Do you ever get to use both boxes?
Well, I'm back to music history (mmmm... Wagner) until the next phisher tries messing with this band teacher. :)