题目:http://www.shiyanbar.com/ctf/1918
# -*- coding: utf-8 -*- import gmpy2 ciper = [704796792, 752211152, 274704164, 18414022, 368270835, 483295235, 263072905, 459788476, 483295235, 459788476, 663551792, 475206804, 459788476, 428313374, 475206804, 459788476, 425392137, 704796792, 458265677, 341524652, 483295235, 534149509, 425392137, 428313374, 425392137, 341524652, 458265677, 263072905, 483295235, 828509797, 341524652, 425392137, 475206804, 428313374, 483295235, 475206804, 459788476, 306220148] plain = [] n = 920139713 p = 18443 q = 49891 e = 19 d=gmpy2.invert(e, (p-1)*(q-1)) flag = '' for i in range(len(ciper)): plain.append(pow(ciper[i], d, n)) flag = flag + chr(plain[i]) pass print flag