ragz on 9:55 AM 08/20/2023: Requires GLIBC_2.34. So if you are using ParrotOS you will require some work to get this to run.

RedVi on 1:13 AM 09/01/2023: import string
cipher = "secr"
ascii_chars = string.ascii_letters + string.digits + string.punctuation
counter = 0
total = 0
for i in cipher:
total+=counter^ord(i)
counter+=1
for chars in ascii_chars:
for chars2 in ascii_chars:
check = ord(chars)+ord(chars2)
if check == 210:
first = ord(chars)^4
second = ord(chars2)^5
secrets = cipher+chr(first)+chr(second)
if secrets != "secret":
print(cipher+chr(first)+chr(second))

jjsimpson on 2:32 PM 09/12/2023: Done
Basically it's the sum of the xor with the string 'secret' and char index, but the answer cannot be 'secret', so a possible solution is 'scaret'.

Malg0d on 2:42 AM 09/17/2023: from z3 import *
s = Solver()
x = 0
y = 0
key = [BitVec("i%s" % i, 8) for i in range(6)]
allowed_chars = \
list(range(ord('a'), ord('z')+1))
for byte in key:
# Add individual constraints for each byte
s.add(Or([byte == ch for ch in allowed_chars]))
known = "secret"
for i in range(6):
x += i ^ ord(known[i])
for j in range(6):
y += j ^ key[j]
s.add(x == y)
if s.check() == z3.sat:
m = s.model()
res = ''.join([chr(m.evaluate(key[i]).as_long()) for i in range(6)])
print(f"Solution: {res}")

SirWardrake on 1:01 AM 05/17/2024: Nice one. Some xor-fun.

You must me logged to submit a solution

Solution by cnathansmith: Reverse engineering walkthrough and python keygen to generate all valid keys up to any given length