Cipher: Crack the Code (4)

25. A colorful table

Hints:

gimmelevel25.jpg
i got another gift for you

First, gimme means:

In golf, a gimme is a shot that the other players agree can count automatically without actually being played.

Gift? Maybe GIF?

1
2
3
4
5
import urllib, Image  
from cStringIO import StringIO  
lv25_str=urllib.urlopen("http://cipher:pyramids@www.gamemastertips.com/ cipher/portention/gimmelevel25.gif").read()  
lv25_io=StringIO(lv25_str)  
lv25_pic=Image.open(lv25_io) 

But it’s not a normal GIF file. Refer to this page:

1
2
3
 13      ? bytes  <Global Color Table(0..255 x 3 bytes) if GCTF is one>  
         ? bytes  <Blocks>  
         1 bytes  <Trailer> (0x3b)  

Color Table? It must be what we need.

lv25_str.find('\x3b')

returned 76. So:

1
2
g=lambda l,n:[l[i:i+n] for i in range(0, len(l), n)]
color_tbl=g(lv25_str[13:76],3)

Reformat our color table color and export human readable form:

1
2
3
import binascii
rf=lambda x: binascii.b2a_hex(x).upper()
clrtbl=['%s%s' % ('#',rf(x)) for x in color_tbl]

And draw a picture to show the table:

1
2
3
4
5
6
7
8
9
10
11
import ImageDraw
block_size=50; gap_size= 20
x_len=7*(block_size+gap_size)+gap_size
y_len=3*(block_size+gap_size)+gap_size
newpic=Image.new('RGB',(x_len,y_len), color=(255,255,255))
draw=ImageDraw.Draw(newpic)
for x in range(7):
	for y in range(3):
		ul=(gap_size-1+x*(block_size+gap_size),gap_size-1+y*(block_size+gap_size))
		lr=(ul[0]+block_size,ul[1]+block_size)
		draw.rectangle((ul,lr),fill=clrtbl[y*3+x],outline="#000000")

lv25 gif

Let’s look back to the pictures. According to this color table we made. Based on the order of color, we could deduce the order of letters, and only the first line could be identified as word. It should be Galaxy.

26. Kung Hei Fat Choy

Hints:

yearlyscraps.jpg

The title is a common wish word in Cantonese, on the other hand, the word scrap means:

Scrap is a term used to describe recyclable and other materials left over from every manner of product consumption, such as parts of vehicles, building supplies, and surplus materials.

So, it must be something recyclable, and yearly , and related to Cantonese. So does it means Chinese Zodiac?

Event Year Zodiac Item
1329 Snake David II becomes king of scotland
1218 Tiger Minamoto no Sanetomo becomes Udaijin of Japan
1561 Rooster Madrid is declared the capital of Spain
1733 Ox Joseph Priestley is born
1104 Monkey Baldwin I captures Acre
1
2
zodiac=['Rat','Ox','Tiger','Rabbit','Dragon','Snake', 'Horse','Goat','Monkey','Rooster','Dog','Pig']
g=lambda x: 1984>=x and zodiac[(x-1984)%12] or zodiac[(12-1984+x)%12]

According to the Initial letter, the answer is easy: storm.

27. Whose idea was this?

Hints:

klndmuzvxytrikzhnnynhlw
mysteriosolevel27.jpg

Word in the crystal ball:

Reflect

This one is the first real cipher game. I google wikipedia for “cipher

In the paragraph subtitled “Historical ciphers”, at first I tried “substitution ciphers” and “transposition ciphers” without any hint and luck. Then continue to “Polyalphabetic cipher”.

lv27 cipher keys

So if we use password “reflect”

1
2
3
4
5
6
7
8
9
10
11
12
import string
encoded="klndmuzvxytrikzhnnynhlw"
len_e=len(encoded)
decoded=""
password="reflect"
ord_a=ord('a')
lc=string.lowercase
len_p=len(password)
for x in range(len_e):
	base=ord(encoded[x])-ord_a
	shift=ord(password[x%len_p])-ord_a
	decoded+=chr((base-shift)%26+ord_a)

And the answer is “thisisgettingridiculous”.

28. Don’t you just hate math?

Hints:

numbers28.jpg

HOBBIES + OBSESSES + (GLIBSOI / 16) - (OOZES x 2) + SHELLOIL - SEIZES - GOOSEGOG + BOBSLEIGH - (EBOOLESIE / 7) - (2x GHLOSHES) = ???
This isn’t some kind of cipher where you have to figure out the numerical values of each letter of the alphabet…look at your hints and think simpler.

And the picture is an old phone. Maybe it’s asking us to translate letters into numbers by phone key mapping? According to the common map:

phone map

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import string
def numap(x):
	l=['ABC','DEF','GHI','jklJKL','MNO','PGRS','TUV','WXYZ']
	all=string.uppercase
	if x in all:
		for a in range(len(l)):
			if x in l[a]: 
				return str(a+2)
	else:
		return x
lv28_str_exp="HOBBIES + OBSESSES + (GLIBSOI / 16) - (OOZES x 2) + SHELLOIL - SEIZES - GOOSEGOG + BOBSLEIGH - (EBOOLESIE / 7) - (2x GHLOSHES)"
lv28_num_exp= "".join ([ numap(x) for x in lv28_str_exp])
trans=string.maketrans("x","*")
lv28_num_exp=lv28_num_exp.translate(trans)
eval(lv28_num_exp)

But the result 221411216 is not correct. We need to reinvestigate the picture.

Enter

I notice this is on the bottom of the phone and it’s inversed. Is it suggest we should invert something?

All appeared characters are:

HOBIESGLZ

and if we invert them, each of them looks like:

4,0,8,1,3,5,6,7,2

Maybe it’s simpler than we thought.

1
2
3
4
import string
trans=string.maketrans("HOBIESGLZx","408135672*")
lv28_str_exp="HOBBIES + OBSESSES + (GLIBSOI / 16) - (OOZES x 2) + SHELLOIL - SEIZES - GOOSEGOG + BOBSLEIGH - (EBOOLESIE / 7) - (2x GHLOSHES)"
lv28_num_exp=lv28_str_exp.translate(trans)
4088135+8535535 + 6718501/16 -235*2 +54377017-531235 - 60053606 + 808573164 -(380073513/7) - 2*64705435

But after calculation, the answer 631701360 is still wrong. Maybe invertion is for the whole word instead of every letters?

5318804 + 53553580 + 1058176 / 16 - 53200 * 2 + 71077345 - 532135 - 60635006 + 461375808 - 315370083 / 7 - 2 * 53450746

The answer 378163771 came out. But wait a minute, it’s still not the answer. Do you notice translation table we used to translate words into numbers? We need to invert it to word: key to next level is illeGlBle.

29. Flag me down

Other than title, Hints are:

dizzying.jpg

The picture is like rotating and surrounded by colorful edges.

Via googling:

flag down: to signal or wave, indicating that someone should stop.

dizzy: Having a whirling sensation and a tendency to fall.

Does it suggest flag signal in the sea? Wikipedia for International Code of Signals

Flag Signals

From outer to inner, the code could be translate to :

R,E,D,U,N,D,A,N,T

Click and input this to next level.

30. This is not the answer that you seek.

Hints:

next to the source code of title, a comment:

liar!

gloomy30.jpg

Then, “this” must be the answer. change the URL to “this.htm”.

Uhh…wrong! Go back! Nothing to see here, honest!

But in the source code,

liar again. try that instead

Change to “that.htm”, a picture with word “O RLY?” appeared. And the source code:

orly.jpg

I guess it’s “Oh, Really?”. Google and wikipedia “O RLY?

O RLY? is an Internet phenomenon, typically presented as an image macro featuring a Snowy Owl. The phrase “O RLY?”, an abbreviated form of “Oh, really?”, is popularly used in Internet forums in a sarcastic manner, often in response to an obvious, predictable, or blatantly false statement. Similar owl image macros followed the original to present different views, including images with the phrases “YA RLY” (Yeah, really.) and “NO WAI!!” (No way!).

There’s others like

YARLY, NOWAI, SRSLY

tried to use them as URL. “yarly.htm” will redirect to “norly.htm”. And there’s link in the source:

../aroundtherosie/

Where’s the password?

1
2
import urllib
src=urllib.urlopen("http://cipher:redundant@www.gamemastertips.com/cipher/encore/yarly.htm").read()

Haha, the password and answer is in the file: awesome:sauce. Click and to the next.

31. Level 31

Hints:

hexagram.jpg

In the picture, there are other shape:

triangle, square, star and others.

From entry in wikipedia.

We know their names:

triangle, square, pentagon, hexagon, heptagon ,octagon, Enneagon, Decagon, Hendecagon, Dodecagon, Tridecagon, Tetradecagon…

The picture file name and the write-line shape are not matched. It should be a octagram. Change URL to “octagram.jpg”, Oops, new picture showes. Follow the sequence, they are:

hexagram.jpg -> octagram.jpg -> decagon.jpg -> heptagon.jpg -> pentagram.jpg -> nonagon.jpg -> icosagram.jpg -> triskaidecagon.jpg

During the process, I noticed the pictures seem like a intact one being separated into several ones.

1
2
3
4
5
6
7
import urllib, Image
from cStringIO import StringIO
names=['hexagram','octagram','decagon','heptagon','pentagram','nonagon','icosagram','triskaidecagon']
pics=[]
for a in names:
	pic=Image.open(StringIO(urllib.urlopen( 'http://awesome:sauce@www.gamemastertips.com/cipher/aroundtherosie/%s.jpg' % a).read()))
	pics.append(pic)

I could get every pics size:

[x.size for x in pics]

and the result is:

[(344,184),(177,184),(357,215),(153,398),(267,164),(243,164),(164,186),(164,193)]

1
2
3
4
5
6
7
8
9
10
newpic=Image.new('RGB',(674,562))
newpic.paste(pics[0],(0,0))
newpic.paste(pics[1],(344,0))
newpic.paste(pics[3],(521,0))
newpic.paste(pics[4],(407,398))
newpic.paste(pics[2],(164,184))
newpic.paste(pics[5],(164,398))
newpic.paste(pics[6],(0,184))
newpic.paste(pics[7],(0,369))
newpic.save('lv31.jpg')

lv31

After that, we could see the background is a design to make a 3-dimention polygon. After google, this is one of the Archimedean solid named: rhombicosidodecahedron.

Comments

Comments