MerlijnWajer / tracy

tracy - a system call tracer and injector. Find us in #tracy on irc.freenode.net
http://hetgrotebos.org/wiki/Tracy
Do What The F*ck You Want To Public License
72 stars 26 forks source link

Tracy.inject() should accept a tuple #24

Closed jbremer closed 11 years ago

jbremer commented 12 years ago

At the moment Tracy.inject() accepts a tracy.SyscallArguments() object, however, since almost always only the first few registers are set, it'd make sense to allow tuples as well.

Resulting in the following code

# inject a write(fd, NULL, 0); call
def hook_write(child, event, args):
    if child.pre:
        child.inject(1, tracy.SyscallArguments(args.a0))

turning into this;

def hook_write(child, event, args):
    if child.pre:
        child.inject(1, (args.a0,))
jbremer commented 11 years ago

This has been implemented.