import multiprocessing as mp from Crypto.Util.number import *
deffoo(): whileTrue: p1 = getPrime(1023) p = 2 * p1 + 1 p2 = 2 * p + 1 if isPrime(p) and isPrime(p2): print(f'AOLIGEI!!!') print(f'{p = }')
if __name__ =="__main__": cores=200 threads=[] for i inrange(0,cores): threads.append(mp.Process(target=foo,args=())) for i inrange(0,cores): threads[i].start() for i inrange(0,cores): threads[i].join()
deffoo(i): set_random_seed(i) whileTrue: p1 = random_prime(2^1023-1, False, 2^1022) p = 2 * p1 + 1 p2 = 2 * p + 1 if is_prime(p) and is_prime(p2): print(f'AOLIGEI!!!') print(f'{p = }')
if __name__ =="__main__": cores=16 threads=[] for i inrange(0,cores): threads.append(mp.Process(target=foo,args=(i,))) for i inrange(0,cores): threads[i].start() for i inrange(0,cores): threads[i].join()
p = 110598963128206029146765005567976400551252821326820761634842705844231553162227632664548054666497796622794062169070761269846059674983300718897806207809316445501660744576082811632826051521981392774109347485625137377414804884956968844657911576950879481134837170517406967712375212664629606155737787366417228920479 p = 125834462937515514677952736351086477723189729376609237064972472894555759877882476569437044272175628959389274769857516194048130275708221472338605048821258868578062704405546439911796474901862378213766360589621269578212699588653799137952968362066454793101495940157317172250788360259833809994814260032964280454279 p = 100901414083041935147565989244623721954379094110518159236755177583163984200889793113587729459559520404983625806167856159967860770505185684577116986060782555274476108602462759564999450628547960715880426418276206531296054104831649681935990743078827088355146864761100183036677309515622196184065072999258123805239 p = 146496675022473012211857165143712747843246040874368584905858010585448843220035648485403137716275826156399518871757281036627660955362913708683959326736269351823871633144933008767581852850465282804501453322937241886850655418311690001221505594362048575315000371530770930693400115574470709373629360789754857606423 p = 153444654371502759312369957861806438560869346201934408107090630860121077971217342534491164144300657682724587336411469313073980007519090429493425313057960273105930550206028662533909546955123308145793269974880422767558196767811472521559229803064323084233643777404514878684631500363639829028720434718377936413723 p = 151938210068739317119037902475523471283351855826895709268281779606178616041813782684483513203011655045886298899315081189952485123708781999276530762477397662483246705057837976284722750121815117376779839692622348687715083607434723618196689363562394123094927732413453290261021832723310278894402025717298262583199
classGao: def__init__(self): self.conn = remote('00.cr.yp.toc.tf', 13377) defgao_1(self): self.conn.recvuntil('send the ') s = self.conn.recvline().decode() mat = re.search(r'f\((.+?)\)', s) x = int(mat.group(1)) y = self.k * x + self.b self.conn.sendline(str(y)) defgao_xy(self, begin, end): self.conn.recvuntil(begin) s = self.conn.recvline().decode() mat = re.search(r'f\((.+?)\) = (.+?)' + end, s) x, y = map(int, [mat.group(i+1) for i inrange(2)]) return x, y