Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local default_structure = [[
- -- This file was generated using Luraph Obfuscator v13.2.1
- return (function(args) body end)
- ]]
- local default_types = {
- 'table',
- 'number',
- }
- local l_types = {
- 'l',
- 'I',
- }
- local copulated_parsing = {}
- local abc = string.split('aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOqQpPrRsStTuUvVxXyYzZ', '')
- local num = string.split('0123456789', '')
- for i,v in pairs(abc) do
- table.insert(copulated_parsing, v)
- end
- for i,v in pairs(num) do
- table.insert(copulated_parsing, v)
- end
- function generate_arg(length)
- local arg = ''
- for i = 1, length do
- arg = arg .. abc[math.random(1, #abc)]
- end
- return arg
- end
- function generate_l(length)
- local l = ''
- for i = 1, length do
- l = l .. l_types[math.random(1, #l_types)]
- end
- return l
- end
- function generate_call(length)
- local call = ''
- for i = 1, length do
- call = call .. string.upper(tostring(copulated_parsing[math.random(1, #copulated_parsing)]))
- end
- return call
- end
- local completed_args = ''
- local arg_count = 50
- for i = 1, arg_count do
- if i == arg_count then
- completed_args = completed_args .. generate_arg(2)
- break
- end
- completed_args = completed_args .. generate_arg(2) .. ','
- end
- local sorted_args = {}
- local parsed_args = string.split(completed_args, ',')
- for i,v in pairs(parsed_args) do
- table.insert(sorted_args, v)
- end
- local generated_script = ''
- for i,v in pairs(sorted_args) do
- if i == arg_count then
- generated_script = generated_script .. v .. ';'
- break
- end
- if i ~= 1 then
- generated_script = generated_script .. v .. ','
- else
- generated_script = generated_script .. 'local ' .. v .. ','
- end
- end
- local sorted_args_types = {}
- for i,v in pairs(sorted_args) do
- if string.find(generated_script, v) then
- else
- warn('ERROR: there was an error while obfuscating script')
- break
- end
- local random_type = default_types[math.random(1, #default_types)]
- sorted_args_types[v] = random_type
- if random_type == 'table' then
- for i = 1, 123 do
- local local_structure = 'local VAL = {};'
- local_structure = string.gsub(local_structure, 'VAL', v)
- --if math.random(1, 10) <= 3 then
- local_structure = string.gsub(local_structure, v, generate_l(math.random(11,19)))
- --end
- generated_script = generated_script .. local_structure
- --if math.random(1, 10) <= 3 then
- local next_structure = 'VAL = {content};'
- next_structure = string.gsub(next_structure, 'VAL', v)
- local completed_content = ''
- local random_length = math.random(5,20)
- for i = 1, 325 do
- if i == random_length then
- completed_content = completed_content .. ' ' .. tostring(math.random(10,99)) .. ' '
- break
- end
- completed_content = completed_content .. ' ' .. tostring(math.random(10,99)) .. ','
- end
- next_structure = string.gsub(next_structure, 'content', completed_content)
- generated_script = generated_script .. next_structure
- --end
- end
- elseif random_type == 'number' then
- local local_structure = 'local VAL = ' .. tostring(math.random(145663,999999)) .. ';'
- local_structure = string.gsub(local_structure, 'VAL', v)
- generated_script = generated_script .. local_structure
- end
- end
- local table_content = {}
- local number_content = {}
- for i,v in pairs(sorted_args_types) do
- if v == 'table' then
- table.insert(table_content, i)
- elseif v == 'number' then
- table.insert(table_content, i)
- end
- end
- --adding functions manually
- local function_names = {
- _print = 'LCQ',
- _setmetatable = 'b',
- _rawset = 'c',
- _table = 'd',
- _rawequal = 'e',
- _rawget = 'f',
- _getmetatable = 'g',
- _loadstring = 'j3b4c',
- }
- for i,v in pairs(function_names) do
- local normal_function = string.gsub(i, '_', '')
- local local_structure = 'local VAR = FUNC;'
- local_structure = string.gsub(local_structure, 'VAR', v)
- local_structure = string.gsub(local_structure, 'FUNC', normal_function)
- generated_script = generated_script .. local_structure
- end
- local generated_call = generate_call(150000)
- generated_script = generated_script .. 'LQC("' .. generated_call .. '");'
- default_structure = string.gsub(default_structure, 'args', completed_args)
- default_structure = string.gsub(default_structure, 'body', generated_script)
- print(default_structure)
- setclipboard(default_structure)
Add Comment
Please, Sign In to add comment