data=[102,10,13,6,28,74,3,1,3,7,85,0,4,75,20,92,92,8,28,25,81,83,7,28,76,88,9,0,29,73,0,86,4,87,87,82,84,85,4,85,87,30] for i inrange(1,len(data)): data[i]^=data[i-1] print(bytes(data))
table = [] final = [] input = "0123456789abcdefghijklmnopqrstuvwxyz{}-" withopen('./out.txt', 'r') as f: whileTrue: line = f.readline() ifnot line: break if line.startswith("table"): lines = line.split() table.append(int(lines[1])) final.append(int(lines[2])) print(table) print(final) flag = "" for i inrange(len(final)): for j inrange(len(table) - 3): if final[i] == table[j]: flag += input[j] print(flag) # flag{781dda4e-d910-4f06-8f5b-5c3755182337}
from pwn import * import string ans = '' for i inrange(42): for ch in string.printable: current_flag = ans + ch print(current_flag) p = process("./moveAside", enc={'LD_PRELOAD': './mystrcmp.so'}) p.recvline() p.sendline(current_flag.encode()) recv = p.recvall(timeout=0.01) recvs = recv.splitlines() iflen(revcs) > len(ans) + 2: ans += ch break