Tags: misc 

Rating:

import sys
from pwn import *
x = remote('34.206.4.227', 44840)

#Regex to extract between quotes
a = re.findall(r"'(.*?)'", x.recv())

#Extracting the letter + number + ending
b = a[0]
c = int(a[1])
d = a[2]

#constructing payload
payload = b * c
payload += d
payload += "\n"

x.send(payload)
sys.stdout.flush()
print(x.recv())

Original writeup (https://github.com/Idomin/CTF-Writeups/blob/master/PicoCTF-2017/looooong).