Crackpy - CTF 15

Hello, Today we will slove a simple RE Challenge.
Challenge Deatils:
CTF Name: Crackpy
Topic: Reverse Engineering
Flag Format: IHC_CTF{}
CTF Link: https://t.me/ctf_invisiblehc/29
Description:
Find the flag by cracking this python file. This file has a algorithm to find the flag.
Solution:
In the CTF challenge, we faced a puzzling code. But, the solution was simple: we just called a specific function in the code. And guess what? We got the flag right away, finishing the challenge.
Solution code:
secret_code = "xwr0r%uL!#_v#c||`}h0#_fN"
alphabet = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"+ \
"[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
def decode_secret(secret):
rotate_const = 47
decoded = ""
for c in secret:
index = alphabet.find(c)
original_index = (index + rotate_const) % len(alphabet)
decoded = decoded + alphabet[original_index]
print(decoded)
# Slove the code by calling the decode_secret function
decode_secret(secret_code)
def summation2():
num1 = input("Enter a number: ")
num2 = input("Enter another number: ")
print( "Summation of " + num1 + " and " + num2 + " is " + str(int(num1) + int(num2)))
#summation2()
After running the Python code, we have successfully uncovered the flag:IHC_CTF{PR0GR4MM1N9_R07}