basic mod 1

https://play.picoctf.org/practice/challenge/253

The file ./message.txt contains a series of numbers. By taking each number mod 37 and then mapping them according to the rules ( 0-25 is the alphabet (uppercase), 26-35 are the decimal digits, and 36 is an underscore. ) mentioned in the question, you can obtain the flag.

exploit

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import string

mes = ""

with open("./message.txt") as fp:
mes = fp.read().strip()

print(mes)

mes_arr = mes.split(" ")
print(mes_arr)

ss = string.ascii_uppercase + string.digits + "_"

flag = []
for i in range(len(mes_arr)):

val = int(mes_arr[i]) % 37
flag.append(ss[val])

print("picoCTF{" + "".join(flag) + "}")