Git Product home page Git Product logo

hexraystoolbox's People

Contributors

0xeb avatar patois avatar yeggor 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

hexraystoolbox's Issues

copy loop

the example you gave in the copy loop doesn't find this type of code as a valid copy loop:

 while ( v5 )
  {
    result = func(arg, pBuffer, v4, v8);
    if ( result )
      break;
    v5 -= v8;
    v4 += v8;
    pBuffer = &chunk[v8];
    v8 = v5;
    if ( v5 > 0x1000 )
      v8 = 4096;
  }

this is the real life code:

while(leftovers > 0)
{
    result = func(arg, chunk, offset, size_to);
    if ( result )
      break;

    offset  += size_to;
    leftovers    -= size_to;
    chunk = (void *)((uint32_t)pBuffer + size_to);

    size_to  = min(leftovers, (uint32_t)SIZE_4K);
}

how can i fix the example you gave to support this ?

thanks!

Question about the query expression

I have used this toolbox for some days and it is very helpful for me to locate some code patterns. However, I do not know how to write a query like the follow decompile code pattern:

1 v1=a1+0x10;
2 if(v1)
3 do something

I want to locate the code like line 1 which the left value has been passed to the if expr or others. Because the line 1 is not the sub-expr of line 2, so I think find_child_expr() function cannot work.

pattern matching?

if ur gonna use python, please give us pattern matching with sympy or something. hexrays schema is miserable to interact with in python. thx.

UnboundLocalError for cfunc local variable in find_item and find_expr functions

There are two places where a program can throw an UnboundLocalError exception:

The value of the variable cfunc is assigned only if the variable f is not None.
To fix this, it is enough to initialize the cfunc variable or rewrite the function like this:

def find_item(ea, q, parents=False):
    """find item within AST of decompiled function
    arguments:
    ea:         address belonging to a function
    q:          lambda/function: f(cfunc_t, citem_t) returning a bool
    parents:    False -> discard cexpr_t parent nodes
                True  -> maintain citem_t parent nodes
    returns list of tb_result_t objects
    """

    f = ida_funcs.get_func(ea)
    if not f:
        return list()
    cfunc = hr.decompile(f)
    if not cfunc:
        return list()
    return find_child_item(cfunc, cfunc.body, q, parents)

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.