defbbencode(n): a = 0 for i in bin(n)[2:]: a = a << 1 if (int(i)): a = a ^ n if a >> 256: a = a ^ 0x10000000000000000000000000000000000000000000000000000000000000223 return a a = 61406787709715709430385495960238216763226399960658358000016620560764164045692 s = 61406787709715709430385495960238216763226399960658358000016620560764164045692 whileTrue: if bbencode(s)==a: print(s.to_bytes(32,'big')) break s = bbencode(s)