#!/usr/bin/python # -*- coding: UTF-8 -*- def caesar(text): for i in range(len(text)): print("{}".format(chr(int(ord(text[i])-4))),end='') caesar('e6Z9i~]8R~U~QHE{RnY{QXg~QnQ{^XVlRXlp^XI5Q6Q6SKY8jUAA')
#! /usr/bin/env python3 # -*- coding: UTF-8 -*- import base64 text = input("請輸入密文: ") info = '' for i in range(len(text)): r = {} r = (chr(int(ord(text[i])-4))) info+=r[0] print(info) flag = base64.b64decode(info) print(flag)
運行結果~python