使用 pwntools 计算发送输入和接收结果之间的时间的最佳敏感方法是什么

问题描述 投票:0回答:1

使用 pwntools 计算发送输入和接收结果之间的时间的最佳敏感方法是什么

这是我使用方式的一部分

    str_time = time.time() p.sendlineafter(b'? ', string_hex) oppa = p.recvuntil(b'This ') end_time = time.time()

python pwntools
1个回答
0
投票

最好的方法是像你一样使用

time
包。

import time

str_time = time.time()

p.sendlineafter(b'? ', string_hex) 
oppa = p.recvuntil(b'This ')

end_time = time.time()

time_difference = end_time - str_time

print("Time taken:", time_difference, "seconds")
© www.soinside.com 2019 - 2024. All rights reserved.