Unscrable the words
The task is to unscrable 10 scrambled words taken from a wordlist and to send in the answer in just 30 seconds.
My approach
We start by creating a file called words2decrypt.txt where we store the scrambled words.
jaaimac
fboaollt
trrside
senlon
nsiksrec
caynlc
dinoig
bsakte
qwtyre
crelnea
Using python we then load in the words2decrypt, together with the wordlist. After that, we simply permutate each scrambled word until we find a match in the wordlist.txt file.
the_decrypted_words = []
for item in words2decrypt:
found = False
while found == False:
temp_perm = ''.join([str(w) for w in random.sample(item, len(item))])
if temp_perm in wordlist:
the_decrypted_words.append(temp_perm)
found = True
print ",".join(the_decrypted_words)
This should produce an output of this format
jamaica, football, strider, nelson, snickers, clancy, indigo, basket, qwerty, cleaner
which is simply copied into the answering field and that's it! 30 seconds is enough to do this task semi manually but in later tasks we'll create automated scripts for everything.
The full code for this mission can be found at Github.