Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
4.1 kB
0
Indexable
Never

"""Try to understand how the obfuscated function work and guess what algorithm it has been used to encrypt the text.
Then recover the secret flag. Good luck!"""

PWNX_FLAG = "PlWS}NIXy{sdI40y4WBoPwjx656lD62RGYMY"

def __decrypt(ciphertext, key):
    b8o4b398foui2nbfoure2b3bfuo2 = ciphertext
    ionqdiodnjdnb2308do23ihb29bdoid23 = key
    bDndio3nino3in2oi = len(b8o4b398foui2nbfoure2b3bfuo2)
    hoinou2ioijh9h8u3o2ijnsh2iohnilnoi1nklbqdoi1 = range(bDndio3nino3in2oi)
    hb8o3h2iheion2p9joilnpqnonINbkhqjvqjknLIn = range(ionqdiodnjdnb2308do23ihb29bdoid23)
    jHjliltCPnuOPBFFYRVifNGgksLOjHmimVEgWgUynPfCDTqzjpCABgoGxXmLKJoFuggAbtLaxePXywC1 = [
        [' ' for iubw4oifnwbfheruwljf in hoinou2ioijh9h8u3o2ijnsh2iohnilnoi1nklbqdoi1] for oiwlkfnjefewkf in
        hb8o3h2iheion2p9joilnpqnonINbkhqjvqjknLIn]
    biu3newoihne8noq = range(bDndio3nino3in2oi)
    knOI32hnoi2hoishin2lknoidn2lkdn2oudlq3wbdj3, wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3, iln2OD3kjBNOINJKNIQNELKNJ8793NDLEnkjNBJEWnbwnejdbjww = None, 0, 0
    for i in biu3newoihne8noq:
        if wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3 == 0:
            knOI32hnoi2hoishin2lknoidn2lkdn2oudlq3wbdj3 = True
        if wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3 == ionqdiodnjdnb2308do23ihb29bdoid23 - 1:
            knOI32hnoi2hoishin2lknoidn2lkdn2oudlq3wbdj3 = False
        jHjliltCPnuOPBFFYRVifNGgksLOjHmimVEgWgUynPfCDTqzjpCABgoGxXmLKJoFuggAbtLaxePXywC1[
            wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3][
            iln2OD3kjBNOINJKNIQNELKNJ8793NDLEnkjNBJEWnbwnejdbjww] = '*'
        iln2OD3kjBNOINJKNIQNELKNJ8793NDLEnkjNBJEWnbwnejdbjww += 1
        wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3 += 1 if knOI32hnoi2hoishin2lknoidn2lkdn2oudlq3wbdj3 else -1
    hb89o2hdi2dn2oi3d2hdgiud = len(b8o4b398foui2nbfoure2b3bfuo2)
    iNOIUkjliwehbkHCBKWUCJBWKCJBckjw = range(hb89o2hdi2dn2oi3d2hdgiud)
    ouwhofi44h3bdiu23obiubdi4 = range(ionqdiodnjdnb2308do23ihb29bdoid23)
    z1704396627118727 = 0
    for i in ouwhofi44h3bdiu23obiubdi4:
        for j in iNOIUkjliwehbkHCBKWUCJBWKCJBckjw:
            if jHjliltCPnuOPBFFYRVifNGgksLOjHmimVEgWgUynPfCDTqzjpCABgoGxXmLKJoFuggAbtLaxePXywC1[i][
                j] == '*' and z1704396627118727 < hb89o2hdi2dn2oi3d2hdgiud:
                jHjliltCPnuOPBFFYRVifNGgksLOjHmimVEgWgUynPfCDTqzjpCABgoGxXmLKJoFuggAbtLaxePXywC1[i][j] = \
                    b8o4b398foui2nbfoure2b3bfuo2[z1704396627118727]
                z1704396627118727 += 1
    N170439662711886228 = []
    wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3, iln2OD3kjBNOINJKNIQNELKNJ8793NDLEnkjNBJEWnbwnejdbjww = 0, 0
    for i in range(hb89o2hdi2dn2oi3d2hdgiud):
        if wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3 == 0:
            knOI32hnoi2hoishin2lknoidn2lkdn2oudlq3wbdj3 = True
        if wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3 == ionqdiodnjdnb2308do23ihb29bdoid23 - 1:
            knOI32hnoi2hoishin2lknoidn2lkdn2oudlq3wbdj3 = False
        if jHjliltCPnuOPBFFYRVifNGgksLOjHmimVEgWgUynPfCDTqzjpCABgoGxXmLKJoFuggAbtLaxePXywC1[
            wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3][
            iln2OD3kjBNOINJKNIQNELKNJ8793NDLEnkjNBJEWnbwnejdbjww] != '*':
            N170439662711886228.append(jHjliltCPnuOPBFFYRVifNGgksLOjHmimVEgWgUynPfCDTqzjpCABgoGxXmLKJoFuggAbtLaxePXywC1[
                                           wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3][
                                           iln2OD3kjBNOINJKNIQNELKNJ8793NDLEnkjNBJEWnbwnejdbjww])
            iln2OD3kjBNOINJKNIQNELKNJ8793NDLEnkjNBJEWnbwnejdbjww += 1
        wiDjzlmBFYtKqEtxqjSuVOuUbpFpTeVOasgifbdtvhYsVEOnrjRvXgBcXaPrDRXMMVZKdQLSzQcllnI3 += 1 if knOI32hnoi2hoishin2lknoidn2lkdn2oudlq3wbdj3 else -1
    return ''.join(N170439662711886228)
Leave a Comment