|Your task is to make a palindrome string by rearranging and concatenating given words.
You have to connect to ppc1.chal.ctf.westerns.tokyo:31111(TCP) to answer the problem.
This challenge was pretty simple. I used the given “example.py” and added the following function to it:
for b in itertools.permutations(l, len(l)):
str1 = ''.join(b)
if str(str1) == str(str1)[::-1]:
Then I called it using the original script structure:
answer = makepal(words)
And the server returned the flag:
The full script can be found here.