Skip to content

Latest commit

 

History

History

Polyphenol

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Polyphenol.py

from z3 import *

s = Solver()

a = [Int(f'a{i}') for i in range(34)]

points = [4, 26, 22, 30, 1, 0, 2, 28, 23, 6, 25, 15, 5, 17, 14, 3, 13]

l = [6218619148819094267912, 3239660278168289094170378865781537878483145039862,
 13167423991006904868698304825721530103488567362, 362300164581366743933077318596814390341728710066538,
  2912, 68, 1115908868222, 37269531510352347514290324712333731253807861642016,
   56973337294691266392513915302684316231304471586, 3613524058959314538010460402,
    889396341293302641051808753025749133146757798168, 43685960244566626421146033917835089685178,
     9183044381254551882537188, 2694648608589552169772471076958756166751152,
      4505915953382938147124977926390455694362, 529597204775372366, 392892826701163426612412172019222254476]

x = 0

for i in range(34):
    s.add(a[i] >= 0x20, a[i] <= 0x7f)

for x in range(len(points)):
    sum = 0
    for i in range(34):
	    sum += a[i] * points[x] ** i
    s.add(sum == l[x])

s.check()
m = s.model()

w = ''

for i in range(34):
    w += chr(m[a[i]].as_long())


print(f'idek{{{w}}}')

FLAG

idek{D1d_y0u_s34rch_7h1s_p0ly_6y_LLL???}