Decrypt.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Cipherinpython 作者: EvanMu96 项目源码 文件源码
def main():
    if len(sys.argv) != 3:
        print('Usage: $python decrypt.py [filename] [key]')
        exit(1)
    try:
        f = open(sys.argv[1])
    except FileNotFoundError as e:
        print(e)
        exit(1)
    plain_text = f.read()
    key = int(sys.argv[2])
    cipher_text = decrypt_message(key, plain_text)
    print(cipher_text + '|')

    # Copy to clipboard
    pyperclip.copy(cipher_text)
    print('Plain text has save to clipboard')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号