data = [] for i inrange(len(data1)): if data1[i] in ["_","0", "4","1"]: data.append([data1[i]]) continue data.append([data1[i], data2[i]])
x = itertools.product(data[0],data[1],data[2],data[3],data[4],data[5],data[6],data[7], data[8],data[9],data[10],data[11],data[12],data[13],data[14],data[15], data[16],data[17],data[18],data[19],data[20],data[21],data[22],data[23], data[24],data[25],data[26],data[27],data[28],data[29],data[30],data[31], data[32],data[33],data[34],data[35]) for i in x: if hashlib.md5("".join(i).encode("utf8")).hexdigest() == "7513209051f455fa44d0fa5cd0f3e051": print("".join(i)) break
from nevergonnagiveyouup import n, e import secrets from hashlib import sha256 from Crypto.Cipher import AES from Crypto.Util.Padding import pad
if __name__ == "__main__": withopen("flag.txt", "rb") as f: flag = f.read().strip()
k = secrets.randbelow(n) print(f"ck = {pow(k, e, n)}") key = sha256(str(k).encode()).digest() cipher = AES.new(key, AES.MODE_ECB) print(f"ct = {cipher.encrypt(pad(flag, AES.block_size)).hex()}")
whileTrue: nevergonnaletyoudown = int(input("I just wanna tell you how i'm feeling... ")) assert nevergonnaletyoudown >= 0 print(f"gotta make you understand: {pow(nevergonnaletyoudown, e, n)}")
链接nc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
F:\CTFTools\yafu-1.34>nc pwn.challenge.ctf.show 28155 ck = 53830851938944413421825489946783740501 ct = 2d67acfe897ac185cfff0beeaf38856356bc0e0a67f253e4da25129c6c409cde165657e156ab7386060222951a532176 I just wanna tell you how i'm feeling... 2 gotta make you understand: 9088662731338809664100216653347181076 I just wanna tell you how i'm feeling... 4 gotta make you understand: 61547101391097434247253645201221024635 I just wanna tell you how i'm feeling... 8 gotta make you understand: 9368775312576566895016755847461863720 I just wanna tell you how i'm feeling... 16 gotta make you understand: 75933324863129460082479849068964500501 I just wanna tell you how i'm feeling...
starting SIQS on c39: 190128968349217409128719777740062362481
==== sieving in progress (1 thread): 624 relations needed ==== ==== Press ctrl-c to abort and save state ==== 518 rels found: 285 full + 233 from 2212 partial, (30808.14 rels/sec)
SIQS elapsed time = 0.1090 seconds. Total factoring time = 0.2692 seconds
# 6 位 回文数 for n inrange(10): for m inrange(10): for k inrange(10): temp = 100001*n+10010*m+1100*k if sympy.isprime(temp): Palind.append(temp) # 7位 for n inrange(10): for m inrange(10): for k inrange(10): for p inrange(10): temp = 1000001*n+100010*m+10100*k+1000*p if sympy.isprime(temp): Palind.append(temp) # 8位 for n inrange(10): for m inrange(10): for k inrange(10): for p inrange(10): temp = 10000001*n+1000010*m+100100*k+11000*p if sympy.isprime(temp): Palind.append(temp) # 9位 for n inrange(10): for m inrange(10): for k inrange(10): for p inrange(10): for q inrange(10): temp = 100000001*n+10000010*m+1000100*k+101000*p+10000*q if sympy.isprime(temp): Palind.append(temp)
for i in Palind: mydigit = sum(list(map(eval,list(str(i))))) if mydigit == 58: print(i)