forked from EONRaider/100-redteam-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rsa_solver.py
19 lines (10 loc) · 813 Bytes
/
rsa_solver.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from Crypto.Util.number import inverse
p = 13096400414421552156969028937353174744908047161155295408964887163262826826036521470217012894200517287339110399380688376522626855275687133288684619779082547
q = 12840054857178763772230365613402198055084749343413307404027010001945719437978924658864009419366334955476170242725335489155132647907960715147801905246920609
e = 65537
ct = 32305409026163713222859212354020077015304928685327842744369445191616303537762118069639355953458045773045005993195097944549512923751703719047488817344339599720835627540521189095721269570852022720021666021201899667129233207585472537514546031754665930962489472140040978466147507216004529382189503453518588974947
n = p * q
phi = (p - 1) * (q - 1)
d = inverse(e, phi)
m = pow(ct, d, n)
print(bytes.fromhex(hex(m)[2:]).decode("ascii"))