So I found some code and wanted to decode it, luckily for me the function to do so was right their and not obfuscated but uh their is like 2k lines and I have to run my studio each time I want to decode, anyway to do this on a mass scale?
The decode function
local char = string.char;
local byte = string.byte;
local sub = string.sub;
local bit = bit32;
local bxor = bit.bxor;
local concat = table.concat;
local insert = table.insert;
local function decrypt_xor(ciphertext, key)
local decrypted_bytes = {}
for i = 1, #ciphertext do
local byte_ciphertext = string.byte(ciphertext, i)
local byte_key = string.byte(key, (i % #key) + 1) -- Repeat the key if shorter than ciphertext
local xor_result = bit.bxor(byte_ciphertext, byte_key)
table.insert(decrypted_bytes, xor_result)
end
return string.char(table.unpack(decrypted_bytes))
end
How I de obfuscate
print("Decode: " .. decrypt_xor("\138\198\223\3\1\39\185\224\216\4\22\46\178\215", "\75\220\163\183\106\98"))