鱼C论坛

 找回密码
 立即注册
查看: 3271|回复: 1

像这种如何进行解密

[复制链接]
发表于 2020-11-25 14:56:53 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. #!/usr/bin/python
  2. from Crypto.Cipher import AES
  3. import binascii
  4. from Crypto.Util.number import bytes_to_long
  5. from flag import flag
  6. from key import key

  7. iv = flag.strip(b'd0g3{').strip(b'}')

  8. LENGTH = len(key)
  9. assert LENGTH == 16

  10. hint = os.urandom(4) * 8
  11. print(bytes_to_long(hint)^bytes_to_long(key))

  12. msg = b'Welcome to this competition, I hope you can have fun today!!!!!!'

  13. def encrypto(message):
  14.     aes = AES.new(key,AES.MODE_CBC,iv)
  15.     return aes.encrypt(message)

  16. print(binascii.hexlify(encrypto(msg))[-32:])

  17. '''
  18. 56631233292325412205528754798133970783633216936302049893130220461139160682777
  19. b'3c976c92aff4095a23e885b195077b66'
  20. '''
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2020-11-25 17:33:27 | 显示全部楼层
解不了
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-30 03:17

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表