Giter VIP home page Giter VIP logo

lua_re's People

Contributors

feicong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lua_re's Issues

关于Lua程序逆向之Luac文件格式分析的一些疑问

您好,我拜读了您的大作,有一些疑问想跟您沟通一下。
我看到文中提到ProtoHeader的定义如下

typedef struct {
    uint32 linedefined;
    uint32 lastlinedefined;
    uchar numparams;
    uchar is_vararg;
    uchar maxstacksize;
} ProtoHeader;

但是我看到lua5.1.5的代码中这部分代码是这样的

static void DumpFunction(const Proto* f, const TString* p, DumpState* D)
{
 DumpString((f->source==p || D->strip) ? NULL : f->source,D);
 DumpInt(f->linedefined,D);
 DumpInt(f->lastlinedefined,D);
 **DumpChar(f->nups,D);**
 DumpChar(f->numparams,D);
 DumpChar(f->is_vararg,D);
 DumpChar(f->maxstacksize,D);
 DumpCode(f,D);
 DumpConstants(f,D);
 DumpDebug(f,D);
}

我的疑问是nups是否在ProtoHeader中被遗漏了?

1

1

ida 7.0 报了一个错

C:\Program Files\IDA 7.0\loaders\luac_loader.py: Traceback (most recent call last):
File "C:/Program Files/IDA 7.0/loaders/luac_loader.py", line 526, in load_file
proto = Proto(li, global_header_size, "0") #function level 0
File "C:/Program Files/IDA 7.0/loaders/luac_loader.py", line 303, in init
self.constants = Constants(li, off)
File "C:/Program Files/IDA 7.0/loaders/luac_loader.py", line 139, in init
constant = ReadConstant(li, off)
File "C:/Program Files/IDA 7.0/loaders/luac_loader.py", line 125, in ReadConstant
constant = Constant(li, off)
File "C:/Program Files/IDA 7.0/loaders/luac_loader.py", line 87, in init
self.type = charAt(li, off)
File "C:/Program Files/IDA 7.0/loaders/luac_loader.py", line 359, in charAt
return struct.unpack('<c', s)[0]
error: unpack requires a string argument of length 1****

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.