Here's how I solved a Job Application Quiz.
First thing I did was inspect the quiz page. I found that there was a piece of code that wasn't really supposed to be there. It was not being executed and I took that as a hint:
function(ascii,a,b,c) {
for(i=0;i<ascii.length;i++) {
if(i%3==0){ascii[i]=(ascii[i]+a)%256;}
if(i%3==1){ascii[i]=(ascii[i]+b)%256;}
if(i%3==2){ascii[i]=(ascii[i]+c)%256;}
}
return ascii;
}
This code indicates that the cipher text is simply a shift cipher of the message where the shift factor varries every three characters.
Next thing I did was assume that the last character would be a period. Knowing that a period has an ASCII code of 46, I found the a
shift factor required to get that. Then I found that with that assumption, the text would start with H**l**
. I assumed that it would start with Hel
for Hello
. Thus I was able to calculate the required b
and c
shift factors.
Then, reverse engineering the code provided, I found that the message was:
Hello, Congratulations for solving the XXXXXX challenge. Please send your solution and CV to icancode@XXXXXXXXXXXXXX.com quoting reference: fea57fca2d.