leak_d的题目与预期解
This commit is contained in:
18
crypto/leak_d/crack.py
Normal file
18
crypto/leak_d/crack.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from Crypto.Util.number import * # type: ignore
|
||||
from pwn import * # type: ignore
|
||||
|
||||
r = remote("localhost",10001)
|
||||
r.recvline()
|
||||
n = r.recvline()
|
||||
n = int(n.decode())
|
||||
|
||||
r.recvline()
|
||||
c = r.recvline()
|
||||
c = int(c.decode())
|
||||
|
||||
r.recvline()
|
||||
d = r.recvline()
|
||||
d = int(d.decode())
|
||||
|
||||
m = pow(c, d, n)
|
||||
print(long_to_bytes(m))
|
||||
Reference in New Issue
Block a user