Coder Social home page Coder Social logo

Function Addr and Offset about nampa HOT 4 CLOSED

thebabush avatar thebabush commented on May 25, 2024
Function Addr and Offset

from nampa.

Comments (4)

thebabush avatar thebabush commented on May 25, 2024

addr is actually the offset inside the buffer given to the matching function, yes. In the case of the Binja plugin I wrote, buffers start at the beginning of functions so addr + funk.offset is correct. It made sense in my head :)

The naming of the variable isn't great... But other than that, is there something I'm missing? My idea was that a "dumb" matching function is actually better since it can be easily adapted to any situation. I'm open to suggestions ;)

from nampa.

sraboy avatar sraboy commented on May 25, 2024

Haha, I think it's just the naming throwing me off. I'm with you on the "dumb" function thing (though a **kwargs could be helpful).

I'm working on implementing ref funcs and, with angr, I also have to consider its symbol.relative_addr and kb.function.addr, plus the binary's remapped base address. Coupled with addr+funk.offset, there's just a lot of addr vars being thrown around.

from nampa.

thebabush avatar thebabush commented on May 25, 2024

Feel free to rename / change things however you want ;) as long as it is still easy to use and works as intended.

from nampa.

sraboy avatar sraboy commented on May 25, 2024

No problem. I mostly wanted to be sure I was understanding it correctly. If I end up doing a more substantive PR for REF functions, I might throw that in as a commit but I try not to change "internal implementation" details.

from nampa.

Related Issues (5)

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.