预期解

This commit is contained in:
2023-08-25 02:50:21 +08:00
parent 1730fd56e8
commit a3ed07d357
4 changed files with 155 additions and 0 deletions

37
crypto/hard_pow/crack3.py Normal file
View File

@@ -0,0 +1,37 @@
from pwn import *
import hashpumpy
import re
context.log_level = 'debug'
conn = remote('localhost', 10001) # 替换为实际的主机名和端口号
# 接收服务器的欢迎消息
string1 = conn.recvline().decode()
conn.recvline()
conn.recvline()
md5hash = re.search('\w{32}', string1)[0]
md5plain = re.search('\w{12}', string1)[0]
a = hashpumpy.hashpump(md5hash,md5plain,"ilove0xfa",8)
# 发送数据到服务器
payload_md5 = a[0].encode()
payload2 = a[1]
conn.sendline(payload_md5)
conn.sendline(payload2)
# 接收并打印服务器的回复
response = conn.recvall()
# 关闭连接
conn.close()