crypto
Hardcore
模2同余方程组
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| from pwn import *
def foo(l): return ''.join([str(i) for i in l])
import numpy as np a=np.identity(256,dtype=np.int64)
r=remote('ctf.b01lers.com',9003) r.sendline('1') s=b'' r.recvuntil('answer.\n') for i in range(256): print(i,s) r.sendline(foo(a[i])) s+=r.recvline().strip() print(s) r.interactive()
|
1 2 3 4 5
| from Crypto.Util.number import *
a=0b0110001001100011011101000110011001111011011001000110111101011111011110010110111101110101010111110110110001101001011010110110010101011111011010000110000101110010011001000110001101101111011100100110010101011111011000110110100001100001011011000111001101111101 print(long_to_bytes(a))
|