Skip to content

Instantly share code, notes, and snippets.

@mzfr
Created April 15, 2019 17:52
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 mzfr/6b9ba840b0790628c49539c9a1cd6761 to your computer and use it in GitHub Desktop.
Save mzfr/6b9ba840b0790628c49539c9a1cd6761 to your computer and use it in GitHub Desktop.
#!/bin/python3
from textwrap import wrap
mapping = {"AAA": "a",
"AAC": "b",
"AAG": "c",
"AAT": "d",
"ACA": "e",
"ACC": "f",
"ACG": "g",
"ACT": "h",
"AGA": "i",
"AGC": "j",
"AGG": "k",
"AGT": "l",
"ATA": "m",
"ATC": "n",
"ATG": "o",
"ATT": "p",
"CAA": "q",
"CAC": "r",
"CAG": "s",
"CAT": "t",
"CCA": "u",
"CCC": "v",
"CCG": "w",
"CCT": "x",
"CGA": "y",
"CGC": "z",
"CGG": "A",
"CGT": "B",
"CTA": "C",
"CTC": "D",
"CTG": "E",
"CTT": "F",
"GAA": "G",
"GAC": "H",
"GAG": "I",
"GAT": "J",
"GCA": "K",
"GCC": "L",
"GCG": "M",
"GCT": "N",
"GGA": "O",
"GGC": "P",
"GGG": "Q",
"GGT": "R",
"GTA": "S",
"GTC": "T",
"GTG": "U",
"GTT": "V",
"TAA": "W",
"TAC": "X",
"TAG": "Y",
"TAT": "Z",
"TCA": "1",
"TCC": "2",
"TCG": "3",
"TCT": "4",
"TGA": "5",
"TGC": "6",
"TGG": "7",
"TGT": "8",
"TTA": "9",
"TTC": "0",
"TTG": " ",
"TTT": "."}
# with open("")
cipher = "GAGTTGAAAATATTGCGGCCGCTGGTAATGATAACATTGCGGCATTTGCTACACCGAGGCGTCGGA"
flag = []
for i in wrap(cipher,3):
flag.append(mapping[i])
print("".join(flag))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment