From 49796bbc0aeb8d0eed1a546a03e5a2919b01252c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E7=9B=9B=E6=B0=91?= <1924815756@qq.com> Date: Wed, 25 Dec 2024 23:22:59 +0800 Subject: [PATCH] 3 12 --- 11.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 11.py diff --git a/11.py b/11.py new file mode 100644 index 0000000..2b5217f --- /dev/null +++ b/11.py @@ -0,0 +1,21 @@ +import os +import shutil +import time + +shutil.rmtree(r'inbox') +os.makedirs('inbox') +willingness = input("Are you sure to send all files in the outbox?\nNO(0)/YES(1)>>> ") +if willingness == "1": + print("Sending", end=">") + time.sleep(1) + for i in range(10): + print(">", end="") + time.sleep(0.2) + shutil.move('outbox/encrypted_hash.txt', r'sent/encrypted_hash.txt') + shutil.move('outbox/encrypted_msg.txt', r'sent/encrypted_msg.txt') + shutil.move('outbox/encrypted_pwd_des.txt', r'sent/encrypted_pwd_des.txt') + print("\rPack sent.") +else: + os.unlink(r'outbox/encrypted_hash.txt') + os.unlink(r'outbox/encrypted_msg.txt') + os.unlink(r'outbox/encrypted_pwd_des.txt') \ No newline at end of file -- 2.34.1