Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- keyword = ["654321", "654231", "654213", "654123", "654132", "654312", "653421", "653412", "653241", "653214", "653142", "653124", "652431", "652413", "652341", "652314", "652143", "652134", "651432", "651423", "651243", "651234", "651324", "651342", "564321", "564231", "564213", "564123", "564132", "564312", "563421", "563412", "563241", "563214", "563142", "563124", "562431", "562413", "562341", "562314", "562143", "562134", "561432", "561423", "561243", "561234", "561324", "561342"]
- aSq = "ABCDEFGHIKLMNOPQRSTUVWXYZ"
- pSq = ["AA","AD","AF","AG","AX","DA","DD","DF","DG","DX","FA","FD","FF","FG","FX","GA","GD","GF","GG","GX","XA","XD","XF","XG","XX"]
- cipher = ["FGGFFFFFFXF", "FFGFDDDGXFA", "GFDXGGGFFXG", "XADXFFGGXDG", "GGGFFFFADGFA", "DFFFGGFAXFFF"]
- newCipher = ["", "", "", "", "", ""]
- def main():
- print("Enter your AlphabetSquare in the syntax of:\n ABCDEF, A being slot 1, you know the deal. Press 1 to use default aSQ.")
- response = input("Enter your aSq: ")
- if response == "1":
- print("Preparing...")
- else:
- response = aSq
- for x in range(0, len(keyword)):
- cipherPT = ""
- letter = ""
- PT = ""
- ##print("Keyword: ", keyword[x])
- for a in range(0, len(cipher)):
- newCipher[a] = cipher[int(keyword[x][a])-1]
- for a in range(0, 11):
- for b in range(0, len(newCipher)):
- cipherPT += newCipher[b][a]
- for a in range(0, len(cipherPT),2):
- for b in range(0, len(pSq)):
- if cipherPT[a:a+2] == (pSq[b]):
- PT += aSq[b]
- if int(keyword[x][0]) == 6:
- PT += "L"
- elif int(keyword[x][0]) == 5:
- PT += "C"
- else:
- print("We dun goofed")
- print("PlainText: ", PT)
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement