Tags: md5 series misc

Rating:

Here is a reminder of the example:


R1:[4, 9, 16, 25, 36, 49]
R2:[13, 16, 14, 16, 22]
R3:[11, 12, 12, 11]
R4:[5, 6, 5]
R5:[11, 11]
R6:


The logic behind this series is that an element in a list is the sum of the digits of the 2 elements above it in the previous list. For example, 16 in R2 is below 9 and 16 in R1, and 16 = (9) + (1 + 6). It follows logically that there are less and less items in the lists.

Here is my script to create a file containing the terms for the seed R1 = [25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625]:

python
r = [25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625]
for i in range(2, len(r)):
next_r = []
j = 0
while j < len(r) - 1:
cell = 0
n1 = r[j]
n2 = r[j+1]
for k in str(n1):
cell += int(k)
for k in str(n2):
cell += int(k)
next_r.append(cell)
j += 1
r = next_r
answer += '\nR' + str(i) + ':' + str(r)

Notice the open('answer.txt', 'w', newline=''). If you are on a Windows system like me (have mercy), Python will sneakily insert CRLF instead of simple LF for newlines, which will result in a wrong MD5 hash. The newline='' parameter is there to make sure that you stay in control of how newlines are written in the file.
Then, we can proceed to calculating the checksum of our answer.txt. I would recommand not using online tools to do this, I lost precious time because of that aswell. I found this MD5sum: a734829aea9dc35004a53b1502600102.
Finally, we send this answer using nc 35.223.124.128 1337, and we get the following flag: vulncon{JVXWIZJNKNPUQZLYMNXWIZI}.