0x3C50 / pyobf2

An in-place obfuscator for python 3.11
BSD 3-Clause "New" or "Revised" License
52 stars 8 forks source link

transformer update request #10

Closed itskekoff closed 1 year ago

itskekoff commented 1 year ago

can u add more rename_format methods like random_string?

also, add string obfuscation mode like this:

table = [0xFF] * 128

for i in range(128):
    if i == 0:
        table[i] = 5
    elif (i == 1):
        table[i] = 7
    elif (i == 2):
        table[i] = 12
    elif (i == 3):
        table[i] = 66

    # and so on each value

def encrypt(var):
    chars = bytearray(var, "UTF-8")
    for i in range(len(chars)):
        chars[i] ^= table[i % len(table)]
    return chars

def decrypt(chars):
    for i in range(len(chars)):
        chars[i] ^= table[i % len(table)]
    return str(chars, "UTF-8")

var = encrypt("elmelmelmelm3123123312312фвыннпипвсыавываы")
print(var)
print(decrypt(var))
0x3C50 commented 1 year ago

Done