Random Encoder 2

Okay, I made the encoder more random now. Good luck!

We are given the following script to reverse

import random as r
r.seed("try_this_lol_1234567890!@#$%^&*()qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM")

flag = "GCTF24{FLAG_REMOVED}"

encoded = ""
for i in flag:
    a = i.swapcase() if r.randint(1, 2) == 1 else i
    b = chr(ord(a) + r.randint(500, 600))
    encoded += b.swapcase() if r.randint(1, 2) == 1 else b
print(encoded) # Flag is ʘⱮˌɳɸȾɅȷⱤɽɉʍɿɅɚɚɳɰʱɚɤⱯʀꞮ˃ⱥɸɝʢɬʴʪȱʡȨʛʋɅʔɰƩʚ

First, lets try to understand this script.

Key Components

  • Fixed seed

  • The character is swapped to uppercase or lowercase based on a random choice

    a = i.swapcase() if r.randint(1, 2) == 1 else i
  • Offset by Random Large Value

    b = chr(ord(a) + r.randint(500, 600))
  • Swapcase Again

    encoded += b.swapcase() if r.randint(1, 2) == 1 else b

After reversing it, we get the following script

Thus the flag is GCTF24{0rD3R_m47TEr$_!n_r@NDoM_f1x3D_5E3d}

Last updated