# CTF解題:affine-cipher SecurityFoscusOnline2023 https://m.facebook.com/profile.php?id=100065584200879 ![](https://i.imgur.com/uLTz9aO.png =50%x) ```python= import string # 先產生小寫字母,再加入其他 s = string.ascii_lowercase # a-z s += '_' # 使用 字典(dictionary)資料型態 來建立 轉換表|解密規則 d = {} for c in range(len(s)): d[s[(c*4 + 15)%27]] = s[c] # 使用 轉換表|解密規則 逐字解出答案 ciphertext = 'ifpmluglesecdlqp_rclfrseljpkq' s1 = '' for x in ciphertext : s1 += d[x] # 印出答案 print(s1) ```