Commit 7b61f4ed by BellCodeEditor

save project

parent cbada4e0
Showing with 9 additions and 22 deletions
import random dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30}
print(dict_hero)
# 私钥 # 提取猴队长的臂力值
key = "abcdefgh使用python实现简单的位移替换加密,制作密码机关真是太好玩了哈哈哈!" print(dict_hero['猴队长'])
# 要加密语句 # 修改猴七的臂力值为32
message = "诺依,周末一起去看动漫展吧!" print()
# 最终加密后的语句 dict_hero['猴七'] = 32
key_message = "" print(dict_hero['猴七'])
# 干扰字符 \ No newline at end of file
noise = "port:@#$%^&"
for i in message:
str1 = i
str2 = random.choice(key)
str3 = random.choice(key)
text = str1+str2+str3
key_message = key_message + text
lista=list(key_message)
lista.insert(random.randint(0,len(lista)),noise)
result="".join(lista)
print(result)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment