Skip to content

Instantly share code, notes, and snippets.

@soundofjw
Created March 11, 2014 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soundofjw/9478149 to your computer and use it in GitHub Desktop.
Save soundofjw/9478149 to your computer and use it in GitHub Desktop.
FEZ Cipher Script
import pycipher
tome_keywords = {
"Cycled Page-Order": "PEABEUAB",
"Presented Order": "PAEAEBUB",
}
# classroom codes
classroom_codes = [
"45 614436",
"223 454335",
]
cycled_order = [1, 5, 2, 6, 3, 7, 4, 8]
reversed_order = list(cycled_order)
reversed_order.reverse()
tome_verses = [
[
"FROM OUT OF NOWHERE",
"IMPOSSIBLE VISITORS",
"OUR BENEFACTORS",
],
[
"WATCHING OVER US",
"IN THE HIDDEN FOLDS OF SPACE",
"IN FRONT OF BEHIND",
],
[
"GIVE THE GOLDEN GIFT",
"A DEEP REVELATION",
"OUR EYES WIDE OPEN",
],
[
"SHAPES TO TESSELLATE",
"WITH SACRED GEOMETRY",
"AN EMPIRE TO BUILD",
],
[
"A NEW PERSPECTIVE",
"THINGS UNSEENS BUT ALWAYS THERE",
"A NEW DIRECTION",
],
[
"THE HEXAHEDRON",
"THE SIXTY FOUR BIT NAME OF GOD",
"THE POINT OF ORIGIN",
],
[
"A PATTERN A CODE",
"A DEEP UNDERSTANDING",
"A GATE TO THE STARS",
],
[
"ALL OF TIME AND SPACE",
"AND THE SPACE OUTSIDE OF SPACE",
"WHERE DOES IT END"
]
]
tome_lines = []
for verse in tome_verses:
tome_lines.extend(verse)
tome_combined = "\n".join(tome_lines)
hexahedron = [
# Presented Face
[
[6, 9, 7, 5],
[3, 0, 9, 5],
[3, 4, 7, 7],
[7, 7, 5, 7]
],
# Front Face
[
[5, 7, 5, 10],
[3, 6, 8, 5],
[3, 8, 5, 7],
[0, 5, 5, 0]
],
# Other Faces (Didn't finish putting these in...)
[
[5, 7, 5, 10],
[3, 6, 8, 5],
[3, 8, 5, 7],
[0, 5, 5, 0]
],
[
[5, 7, 5, 10],
[3, 6, 8, 5],
[3, 8, 5, 7],
[0, 5, 5, 0]
],
[
[5, 7, 5, 10],
[3, 6, 8, 5],
[3, 8, 5, 7],
[0, 5, 5, 0]
],
[
[5, 7, 5, 10],
[3, 6, 8, 5],
[3, 8, 5, 7],
[0, 5, 5, 0]
],
]
# NOT IT.
# Begin by printing ciphers
# print "VIGENERE"
# for name, tome_key in tome_keywords.iteritems():
# print name + ": " + tome_key
# for line in tome_lines:
# print pycipher.Vigenere(tome_key).decipher(line).lower()
# NOT IT.
# print "CAESAR"
# for key in range(26):
# print str(key) + ": "
# for line in tome_lines:
# print pycipher.Caesar(key).decipher(line).lower()
# NOT IT. ...
tome_full = tome_combined.replace("\n", "").lower()
tome_stream = tome_full.replace(" ", "")
# Tried printing the letters out again in 1-5, 2-6, 3-7, 4-8 order
tome_output = ""
group_idx = 0
tome_len = len(tome_stream)
while tome_stream:
tome_excerpt = tome_stream[:8]
tome_stream = tome_stream[8:]
for i in range(4):
if i+group_idx >= tome_len-1:
break
tome_output += tome_excerpt[i+0] + tome_excerpt[i+4]
group_idx += 8
print tome_output
"""foruotmofhneorweismspioblseivtiorrsboeunetfoarcswhaitncgouvseirntihdedhendfsoolfsepiancfroofnbtehgiinvdetohledgentgaidfeevperleatoiuorneyiedsewopheanpsesetsostelelwaitthrseadcgetormyeaniermeptolbduainerwsppeecettihvinngsseuentsabluwahyesrteadnierwecnttihoehheexdaroenstihxtuyrfboitenoafmgoedptohinotroifgiantatperondaecaduenedpernsdtiangtaegtaotthaerssafltliomesapnadcetahnedspoauctesifdsepoaceerwehdoteesnid"""
exit(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment