我必须从 netcat 获取输出,对其进行解码并返回。
键入后:
nc cs2107.spro.ink 9000
Run Code Online (Sandbox Code Playgroud)
我得到的输出是这样的:
Welcome to the Proof of work challenge!
Rules: i will provide hex encoded byte strings to you.
Your task is to decode it and calculate the md5 hash in hex encoded format and return it back to me. You will need to do this 500 times!
Ready? Go!
cdde140fffda1da2bc3f
MD5:
Run Code Online (Sandbox Code Playgroud)
所以我必须接受那个十六进制编码的字符串,解码它并再次输出它,这假设发生了 500 次。
我想我知道我必须做什么,但我不知道如何在 unix 中对其进行编码。我认为需要一个 .sh 文件?但我不太确定。
从 nc cs2107.spro.ink 9000 开始
从 nc 输出中搜索十六进制字符串
解码它并计算 md5 哈希
最后,送回去
编辑:
我知道这样做可以保存 …