0% found this document useful (0 votes)
18 views7 pages

# Encode For V3 LITE

The document contains Lua code for obfuscating other Lua code. It defines functions for encrypting strings, tables, and functions. It also includes encrypted code blocks and defines decoding functions to decrypt the encoded content.

Uploaded by

sehine4588
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views7 pages

# Encode For V3 LITE

The document contains Lua code for obfuscating other Lua code. It defines functions for encrypting strings, tables, and functions. It also includes encrypted code blocks and defines decoding functions to decrypt the encoded content.

Uploaded by

sehine4588
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

-- # Encode For V3 Lite

-- # By @Kaban_prod

local Locate = gg.prompt({"Select Lua File"}, {gg.getFile()}, {"file"})

local data = io.open(Locate[1]):read("*a")


local upvalues, upval = {
"gg",
"io",
"debug",
"os",
"string",
"table"
}, {
"print",
"load",
"pcall",
"type"
}

local Request = gg.alert("Encrypt All Functions?\n\n*click \"no\" if encryption


errors", "Yes", "No")
if Request == 1 then
data = data:gsub("local%s*function%s*(.-)%((.-)%)", "local %1 =
function(%2)")
data = data:gsub("function (.-)%((.-)%)", "_G['%1'] = function(%2)")
end

local ApiRequest = gg.alert("Encrypt all api functions?\n\n*click \"no\" if


encryption errors", "Yes", "No")

if (ApiRequest == 1) then
for k, v in ipairs(upvalues) do
data = data:gsub('(' .. v .. ')%.([^%(%s*%.%)%,%"%\']+)', '_G["%1"]
["%2"]')
end
for k, v in ipairs(upval) do
data = data:gsub(v .. "([%(])", "_G['" .. v .. "']%1")
end
end

____ = ([===[
_KaBaN_(
{
67,
78, -- Key
98,
2 -- Pointer Key
}, 99, 84, KeyZ -- String, Key, Key
)
]===])

local KeyZ = math.random(0, 255)

local Obfuscate_index = function(index)


local RandomKeyIndex = math.random(1, 500)
return ((index - 125) + RandomKeyIndex), RandomKeyIndex
end
local ObfusTable = {}
local ObfuscateKey = function(int)
local ObfKey = math.random(1, 129)
local int = (int - 5) % 255
table.insert(ObfusTable, 'Obfusacte(' .. (int - ObfKey) % 255 .. ', ' ..
ObfKey .. ')')
local _obf, key = Obfuscate_index(#ObfusTable)
return 'ObfusTable[Obf_ind(' .. _obf .. ', ' .. key .. ')]'
end

local obf_table = function(table)


for k, v in ipairs(table) do
table[k] = v:gsub("%d+", function(x)
return (tonumber(x) - 5 + #table) % 255
end)
end
return table
end

local KabanPro = function(x)


local byte, encode, keyy = gg.bytes(x), {}, 0
for k, v in ipairs(byte) do
if math.random(1, 2) == 1 then
table.insert(encode, v)
else
keyy = keyy + 1
table.insert(encode, v)
table.insert(encode, 0)
end
end
for k, v in ipairs(encode) do
if v ~= 0 then
encode[k] = (encode[k] + keyy) % 255
end
end
return '_K[MainChunk]({' .. table.concat(encode, ', ') .. '})'
end

local _KabanZ_ = function(string)


local Bytes = gg.bytes(string)
if #string == 0 then
return '"' .. string .. '"'
elseif #string == 1 then
return "_kaban__(" .. table.concat(Bytes, ", ") .. ")"
end
local RandKeyPoint = math.random(#Bytes)
local RandKey, RandKey2 = math.random(255), math.random(255)
local ByteString, insert = { }, table.insert
for k, v in next, Bytes do
if k == RandKeyPoint then
insert(ByteString, RandKey)
Byte = ((v + 5 - RandKey) - RandKey2 + KeyZ) % 255
else
insert(ByteString, ((v + 5 - RandKey) - RandKey2 + KeyZ) % 255)
end
end
return "_KaBaN_({" .. table.concat(ByteString, ", ") .. ", " ..
ObfuscateKey(RandKeyPoint) .. "}, " .. KabanPro(Byte) .. ", " ..
ObfuscateKey(RandKey2) .. ", " .. "KeyZ, " .. "(function() return _K[\"\\n\\n\\
tKaban V3 Lite\\t\\n\\n\"] end)())"
end

local Blocks = ([=[


local gg = gg;
local table = table;
local string = string;
local _ENV = _ENV;
local tostring = tostring;
local tonumber = tonumber;
local os = os;
local math = math;
local _kaban__ = string.char;
local debug = debug;

local GetTableSpam = {}
local b, toStr, GetSpamName = 0, tostring;

local tmp = (function()


local tempString = ''
while (b < (10^2)) do
tempString = tempString .. toStr(b * b);
b = b + 1
end
GetSpamName = (function() local HashName = '' for i = 1, 10 do HashName = "" ..
HashName .. ""☃️.. HashName .. " " end return HashName:rep(100) end)()
return tempString;
end)();

local spam = "Boar"


local c, b = "'" .. math.random(1, 255) .. "'", math.random(100, 300)
if tostring("@") == "" then
return
end

if eQaFgHkJbb == nil or KbVnH == nil then


if math.random(100, 101) < 100 or math.random(100, 101) > 101 or
math.random(98882997) == 98882997 then
return
elseif tostring(debug.getinfo):match("@") then
return
elseif string.match(c, c) ~= c then
return
elseif string.len(tostring(string.match)) ~= 22 or string.len(b) == 22 or
type(string.len(b)) ~= "number" then
return
elseif tostring(string.match):find("@") then
return
elseif string.match("z", "z") == string.match("g", "g") then
return
elseif string.match("zV", "zV") == nil then
return
elseif string.find("zV", "zV") == nil then
return
end
for k, v in next, _ENV do
if tostring(v):match("function: @.-:") then
return
end
end

local func = os.exit


if tostring(func):match("-") or tostring(func):match("//") or
tostring(func):match("@") or tostring(func):match("%d+") then
return
end
end

local spam_2 = "is top"

for i = 1, #tmp do
GetTableSpam[i] = {["address"] = GetSpamName, ["flags"] = GetSpamName,
["value"] = GetSpamName, ["freeze"] = GetSpamName, ["name"] = GetSpamName,
GetTableSpam[i - 1]}
gg.refineNumber(GetTableSpam)
gg.refineAddress(GetTableSpam)
end

]=]):gsub('"(.-)"', function(x)
return "_kaban__(" .. table.concat(gg.bytes(x), ", ") .. ")"
end)

local encodeStrings = function(code)


local strings = { };
local i = 1;
local function x() for k, v in pairs(strings) do code =
code:gsub(v:gsub("%p", function(c) return "%" .. c end), function(c) return
_KabanZ_(c) end, 1) end return code end
repeat
local check1, check2 = code:sub(i, i), code:sub(i + 1, i + 1)
if check1 == "[" and (check2 == "=" or check2 == "[") then
local _, __ = nil;
local codex = code:sub(i, -1);
local a = codex:match("%[(.-)%[");
local b = string.format("%%[%s%%[.-%%]%s%%]", a, a);
local c = codex:match(b);
strings[#strings + 1] = c
_, __ = codex:find(b)
i = i + __ - 1
elseif check1 == "\"" or check1 == "'" then
local _, __ = nil;
local codex = code:sub(i, -1);
local a = check1 .. ".-" .. check1;
local b = codex:match(a);
local indent = nil;
while not indent do
if b:sub(-2, -2) ~= "\92" then
strings[#strings + 1] = b
_, __ = codex:find(a)
i = i + __ - 1
indent = true
else
local n = 0;
for u = #b - 1, 1, -1 do
if b:sub(u, u) ~= "\92" then
if n % 2 ~= 0 then
a = a .. ".-" .. check1
b = codex:match(a)
else
indent = true
end
break
else
n = n + 1
end
end
end
end
end
i = i + 1
until i > #code
return x()
end

data = encodeStrings(data)

local KeyZ = ObfuscateKey(KeyZ)

data = Blocks .. ([==[

local _K = { };
table.insert(_K, "255")
local MainChunk = "\n\n\tKaban V3 Lite\t\n\n"
_K["KABAN V3 LITE"] = "Kaban V3 Lite"
local two, three, percent, five = 2, 3, (function() return 255 end)(), (9 * 3) - 10
- 7 - (2.5 * 2)

local obf_table = function(...)


for k, v in next, ({...})[1] do
table[k] = (function()
return (v + five) % percent
end)()
end
return table
end

local Obfusacte = function(...)


local Var = ({...})
return (Var[#Var - 1] + Var[#Var]) % _K[#_K]
end

local _X_ = {string.char, table.unpack, "\\n", "\n", "\\t", "\t"}

local get_string = function(...)


local vars = ({...})
return (function() return ((vars[1] - (#jj and 5) + vars[2]) + vars[3] -
vars[4]) end)() % percent - #jj
end

local _KaBaN_ = function(...)


local decrypt = { };
local GetStr = function(...)
return ((...):sub(2, #(...) - 1):gsub("\\", ""))
end
local FouR = three + 1
local args, one = ({...}), 1;
if xXx[#xXx](#xXx - 1)[xXx[(#xXx + 1) - #xXx]] ~= xXx[two] then
local key1 = args[one][args[one][#args[one]]];
local PointerKey = args[one][#args[one]]
local Point = #args[one]
local FouR = three + 1
if spam ~= '' or spam_2 ~= '' then
for k, v in next, args[one - #jj] do
if k ~= PointerKey and k ~= Point then
table.insert(decrypt, get_string(v, key1,
args[three], args[three + 1]))
elseif k == PointerKey + #jj then
table.insert(decrypt, get_string(args[two], key1,
args[three], args[FouR]))
end
end
end
end
return GetStr((_X_[one](_X_[two](decrypt)):gsub(_X_[three],
_X_[FouR]):gsub(_X_[FouR + 1], _X_[#_X_])))
end

_K[MainChunk] = function(...)
local decode, i = {}, 0
for k, v in ipairs(...) do
if v ~= 0 then
table.insert(decode, v)
else
i = i + 1
end
end
for k, v in ipairs(decode) do
decode[k] = (decode[k] - i + #jj) % _K[#_K] - #jj
end
return (string.char(table.unpack(decode)):gsub('\\n', '\n'):gsub('\\t', '\
t'))
end

local ObfusTable = obf_table({]==]) .. table.concat(ObfusTable, ', ') .. ([==[})


local KeyZ = ]==]) .. KeyZ .. ([==[;

]==]) .. data

local online;
local online_check = gg.alert("will it be an online script?", "Yes", "No")
if (online_check == 1) then
online = "nil"
end

local data = ([=[

local _ind = {125}


local Obf_ind = function(...)
return ((({...})[1] + _ind[1]) - ({...})[2])
end

local jj
local debug = debug
local xXx = {"namewhat", "local", debug.getinfo}
jj = {]=] .. (online or "xXx[#xXx](#xXx)") ..[=[} or {}
]=]) .. "\n;(function(...)\n" .. data .. "\nend)(\"👑 Kaban v3 Lite 👑\")\n"
io.open("Good Job.not dump.lua", "w"):write(data)
data = string.dump(load(data), true)

local ResuestLasm = gg.alert("add anti-lasm?\n\n*click \"no\" if encryption


errors", "Yes", "No")

if (ResuestLasm == 1) then
data =
data:gsub(string.char(0x1f,0x00,0x80,0x00),string.char(0xa4,0x00,0x80,0x00),1)

local randomly_strings = function(...)


return (math.random(1,16))
end

local really_hex = {
[1] = string.char(0x00, 0x63, 0x01, 0xff, 0x7f, 0x17),
[2] = string.char(0x80, 0x00, 0x1f, 0x00, 0x80),
[3] = string.char(3,0,0,0,0,0,0x38,0x8f,0x40),
}

local modified_hex = {
[1] = string.char(0x00, randomly_strings(), randomly_strings(),
randomly_strings(), randomly_strings(), randomly_strings()),
[2] = string.char(0x80, 0x00, 0xe4, 0x00, 0x80),
[3] = string.char(3,0,0,0,0,0,0,0xf0,0x7f),
}

for i in ipairs(really_hex) do
data = string.gsub(data, really_hex[i], modified_hex[i])
end
end

io.open(Locate[1] .. ".[LITE]™.lua", "w"):write(data .. '\n\n--\t\tCopyright Kaban


2021 - 2022')
--print(data)

You might also like