2021-09-22
ecb,_it’s_easy_as_123
Somebody leaked a still from the upcoming Happy Feet Three movie,
which will be released in 4K, but Warner Bros. was smart enough
to encrypt it. But those idiots used a black and white bmp format,
and that wasn’t their biggest mistake. Show 'em who’s boss and
get the flag.
翻譯一下
有人泄露了即將上映的《快樂(lè)的腳》電影中的一個(gè)靜物,
它將在4K中發(fā)布,但華納兄弟足夠聰明
加密它。但是那些白癡用的是黑白bmp格式,
這并不是他們最大的錯(cuò)誤。讓他們知道誰(shuí)是老板
拿旗子。
bmp文件用ps打開(kāi)沒(méi)成功,
用010Editor打開(kāi)
發(fā)現(xiàn)文件開(kāi)頭并不是bmp的文件開(kāi)頭
(關(guān)于了解bmp,可以看:https://blog.csdn.net/qingchuwudi/article/details/25785307)
先嘗試了在文件前面加bmp的文件頭
沒(méi)成功
查了大佬的代碼
from Crypto.Util.number import long_to_byteswith open('ecb.bmp','rb') as f:data=f.read() pre=0x424d76483f00000000007600000028000000000f000070080000010004000000000000483f00000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000c0c0c0000000ff0000ff000000ffff00ff000000ff00ff00ffff0000ffffff00ffffffffffffffffffffL out=long_to_bytes(pre)+data[128:]with open('out.bmp','wb') as g:g.write(out)也就是將前128位字符替換成bmp應(yīng)該的前128位字符
運(yùn)行得到
所以最后答案為:
flag{no_penguin_here}
總結(jié)
以上是生活随笔為你收集整理的2021-09-22的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: HBNIS-crypto
- 下一篇: 虚拟机安装中文输入法