Code Monkey home page Code Monkey logo

Comments (4)

apsonLi avatar apsonLi commented on September 26, 2024 16

u can achieve it by fixing the original code

Where I can find this fix?

Decompilation of the sample you uploaded:

-- params : ...
-- function num : 0
module("dumper", package.seeall)
require("json")
json_encode = function(l_1_0, l_1_1)
-- function num : 0_0
local l_1_2 = (json.encode)(l_1_0)
if l_1_1 ~= nil and l_1_1 == 1 then
return l_1_2
end
local l_1_3 = ""
local l_1_4 = 1
local l_1_5 = 0
local l_1_6 = 3
local l_1_7 = (string.sub)(l_1_2, l_1_4, 1)
while 1 do
if l_1_4 <= (string.len)(l_1_2) then
do
if l_1_7 == """ and l_1_4 - 1 > 0 and (string.sub)(l_1_2, l_1_4 - 1, l_1_4 - 1) ~= "\" then
if false == true then
local l_1_8, l_1_9, l_1_10, l_1_11, l_1_12 = false
else
end
end
if l_1_7 == ":" and true == false then
l_1_3 = l_1_3 .. " : "
else
-- DECOMPILER ERROR at PC54: Confused about usage of register: R8 in 'UnsetPending'

      if l_1_7 == "," and true == false then
        l_1_3 = l_1_3 .. ",\n" .. (string.rep)(" ", l_1_5)
      else
        -- DECOMPILER ERROR at PC69: Confused about usage of register: R8 in 'UnsetPending'

        if (l_1_7 == "{" or l_1_7 == "[") and true == false then
          if l_1_4 - 1 > 0 and (string.sub)(l_1_2, l_1_4 - 1, l_1_4 - 1) ~= ":" and (string.sub)(l_1_2, l_1_4 - 1, l_1_4 - 1) ~= "," then
            l_1_3 = l_1_3 .. "\n" .. (string.rep)(" ", l_1_5)
          end
          l_1_3 = l_1_3 .. l_1_7 .. "\n" .. (string.rep)(" ", l_1_5 + l_1_6)
          l_1_5 = l_1_5 + l_1_6
        else
          -- DECOMPILER ERROR at PC113: Confused about usage of register: R8 in 'UnsetPending'

          if (l_1_7 == "}" or l_1_7 == "]") and true == false then
            if l_1_5 - l_1_6 >= 0 then
              l_1_5 = l_1_5 - l_1_6
            else
              l_1_5 = 0
            end
            if (string.sub)(l_1_2, l_1_4 + 1, l_1_4 + 1) == "," then
              l_1_4 = l_1_4 + 1
              l_1_3 = l_1_3 .. "\n" .. (string.rep)(" ", l_1_5) .. l_1_7 .. ",\n"
            else
              l_1_3 = l_1_3 .. "\n" .. (string.rep)(" ", l_1_5) .. l_1_7 .. "\n"
            end
            l_1_3 = l_1_3 .. (string.rep)(" ", l_1_5)
          else
            l_1_3 = l_1_3 .. l_1_7
          end
        end
      end
    end
    l_1_4 = l_1_4 + 1
    l_1_7 = (string.sub)(l_1_2, l_1_4, l_1_4)
    -- DECOMPILER ERROR at PC170: LeaveBlock: unexpected jumping out DO_STMT

    -- DECOMPILER ERROR at PC170: LeaveBlock: unexpected jumping out IF_THEN_STMT

    -- DECOMPILER ERROR at PC170: LeaveBlock: unexpected jumping out IF_STMT

  end
end

end
return l_1_3
end

dumpTable = function(l_2_0, l_2_1)
-- function num : 0_1
print(json_encode(l_2_0, l_2_1))
end


if you need ,i could send u the luadec which i fixed ,but because of my spare time consumption, may be u should put a price on it

from luadec.

testuser7 avatar testuser7 commented on September 26, 2024

I have the same problem:
dumper.zip

from luadec.

apsonLi avatar apsonLi commented on September 26, 2024

@testuser7 i had decompiled successfully the sample which you uploaded , u can achieve it by fixing the original code

from luadec.

testuser7 avatar testuser7 commented on September 26, 2024

u can achieve it by fixing the original code

Where I can find this fix?

from luadec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.