XDMANFROMXDWORLD

Luraph Source Code 2022

Jan 11th, 2022 (edited)
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.67 KB | None | 0 0
  1. local default_structure = [[
  2. -- This file was generated using Luraph Obfuscator v13.2.1
  3.  
  4. return (function(args) body end)
  5. ]]
  6.  
  7. local default_types = {
  8.    'table',
  9.    'number',
  10. }
  11.  
  12. local l_types = {
  13.    'l',
  14.    'I',
  15. }
  16.  
  17. local copulated_parsing = {}
  18. local abc = string.split('aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOqQpPrRsStTuUvVxXyYzZ', '')
  19. local num = string.split('0123456789', '')
  20. for i,v in pairs(abc) do
  21.    table.insert(copulated_parsing, v)
  22. end
  23. for i,v in pairs(num) do
  24.    table.insert(copulated_parsing, v)
  25. end
  26.  
  27. function generate_arg(length)
  28.    local arg = ''
  29.    for i = 1, length do
  30.        arg = arg .. abc[math.random(1, #abc)]
  31.    end
  32.    return arg
  33. end
  34.  
  35. function generate_l(length)
  36.    local l = ''
  37.    for i = 1, length do
  38.        l = l .. l_types[math.random(1, #l_types)]
  39.    end
  40.    return l
  41. end
  42.  
  43. function generate_call(length)
  44.    local call = ''
  45.    for i = 1, length do
  46.        call = call .. string.upper(tostring(copulated_parsing[math.random(1, #copulated_parsing)]))
  47.    end
  48.    return call
  49. end
  50.  
  51. local completed_args = ''
  52. local arg_count = 50
  53. for i = 1, arg_count do
  54.    if i == arg_count then
  55.        completed_args = completed_args .. generate_arg(2)
  56.        break
  57.    end
  58.    completed_args = completed_args .. generate_arg(2) .. ','
  59. end
  60.  
  61. local sorted_args = {}
  62. local parsed_args = string.split(completed_args, ',')
  63. for i,v in pairs(parsed_args) do
  64.    table.insert(sorted_args, v)
  65. end
  66.  
  67. local generated_script = ''
  68. for i,v in pairs(sorted_args) do
  69.    if i == arg_count then
  70.        generated_script = generated_script .. v .. ';'
  71.        break
  72.    end
  73.    if i ~= 1 then
  74.        generated_script = generated_script ..  v .. ','
  75.    else
  76.        generated_script = generated_script .. 'local ' .. v .. ','
  77.    end
  78. end
  79.  
  80. local sorted_args_types = {}
  81. for i,v in pairs(sorted_args) do
  82.    if string.find(generated_script, v) then
  83.        
  84.    else
  85.        warn('ERROR: there was an error while obfuscating script')
  86.        break
  87.    end
  88.    local random_type = default_types[math.random(1, #default_types)]
  89.    sorted_args_types[v] = random_type
  90.    if random_type == 'table' then
  91.        for i = 1, 123 do
  92.            local local_structure = 'local VAL = {};'
  93.            local_structure = string.gsub(local_structure, 'VAL', v)
  94.            --if math.random(1, 10) <= 3 then
  95.                local_structure = string.gsub(local_structure, v, generate_l(math.random(11,19)))
  96.            --end
  97.            generated_script = generated_script .. local_structure
  98.            --if math.random(1, 10) <= 3 then
  99.                local next_structure = 'VAL = {content};'
  100.                next_structure = string.gsub(next_structure, 'VAL', v)
  101.                local completed_content = ''
  102.                local random_length = math.random(5,20)
  103.                for i = 1, 325 do
  104.                    if i == random_length then
  105.                        completed_content = completed_content .. ' ' .. tostring(math.random(10,99)) .. ' '
  106.                        break
  107.                    end
  108.                    completed_content = completed_content .. ' ' .. tostring(math.random(10,99)) .. ','
  109.                end
  110.                next_structure = string.gsub(next_structure, 'content', completed_content)
  111.                generated_script = generated_script .. next_structure
  112.            --end
  113.        end
  114.    elseif random_type == 'number' then
  115.        local local_structure = 'local VAL = ' .. tostring(math.random(145663,999999)) .. ';'
  116.        local_structure = string.gsub(local_structure, 'VAL', v)
  117.        generated_script = generated_script .. local_structure
  118.    end
  119. end
  120.  
  121. local table_content = {}
  122. local number_content = {}
  123.  
  124. for i,v in pairs(sorted_args_types) do
  125.    if v == 'table' then
  126.        table.insert(table_content, i)
  127.    elseif v == 'number' then
  128.        table.insert(table_content, i)
  129.    end
  130. end
  131.  
  132. --adding functions manually
  133. local function_names = {
  134.    _print = 'LCQ',
  135.    _setmetatable = 'b',
  136.    _rawset = 'c',
  137.    _table = 'd',
  138.    _rawequal = 'e',
  139.    _rawget = 'f',
  140.    _getmetatable = 'g',
  141.    _loadstring = 'j3b4c',
  142. }
  143.  
  144. for i,v in pairs(function_names) do
  145.    local normal_function = string.gsub(i, '_', '')
  146.    local local_structure = 'local VAR = FUNC;'
  147.    local_structure = string.gsub(local_structure, 'VAR', v)
  148.    local_structure = string.gsub(local_structure, 'FUNC', normal_function)
  149.    generated_script = generated_script .. local_structure
  150. end
  151.  
  152. local generated_call = generate_call(150000)
  153. generated_script = generated_script .. 'LQC("' .. generated_call .. '");'
  154.  
  155. default_structure = string.gsub(default_structure, 'args', completed_args)
  156. default_structure = string.gsub(default_structure, 'body', generated_script)
  157.  
  158. print(default_structure)
  159. setclipboard(default_structure)
Add Comment
Please, Sign In to add comment