DownUnderCTF 2020: In a pickle

In a pickle

200 points

Author: n00bmaster
We managed to intercept communication between und3rm4t3r and his hacker friends. However it is obfuscated using something. We just can’t figure out what it is. Maybe you can help us find the flag?

data

(dp0
I1
S'D'
p1
sI2
S'UCTF'
p2
sI3
S'{'
p3
sI4
I112
sI5
I49
sI6
I99
sI7
I107
sI8
I108
sI9
I51
sI10
I95
sI11
I121
sI12
I48
sI13
I117
sI14
I82
sI15
I95
sI16
I109
sI17
I51
sI18
I53
sI19
I53
sI20
I52
sI21
I103
sI22
I51
sI23
S'}'
p4
sI24
S"I know that the intelligence agency's are onto me so now i'm using ways to evade them: I am just glad that you know how to use pickle. Anyway the flag is "
p5
s.

Solution

I’ve written python script to resolve this challenge:

import re
i = 0

string_re = re.compile("S'(.*)'")

with open('data', 'r') as f:
    for line in f:
        i += 1
        finding = string_re.findall(line)
        if finding:
            print(finding[0], end='')
        elif line.startswith('I'):
            print(chr(int(line[1:])), end='')

DUCTF{p1ckl3y0uRm3554g3}

Privacy Policy
luc © 2021