hackedteam/fuzzer-android

View on GitHub
dbi/instruments/functions_coverage_adobe/hijack_func/blow.c~

Summary

Maintainability
Test Coverage
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dlfcn.h>
#include "libt.h"
#include "util.h"
#include "blow.h"

//int blow(int a)

int (*orig_blow)(int a);

/*
void my_cb_blow(...) // FIXME
{
    struct special_blow_t *d = (struct special_blow_t*) hook_blow.data;
    pphLibNfc_RspCb_t cb = d->orig_cb;
    log("call %s\n", __func__)

    log("call %s end\n", __func__)
    cb(pContext, Status);
}
*/

int my_blow(int a ) // FIXME
{
    orig_blow = (void*) hook_blow.orig;
    log("%s enter\n", __func__)
    log("orig_blow = %x\n", orig_blow)

    //struct special_blow_t *d = (struct special_blow_t*)hook_blow.data;

    hook_precall(&hook_blow);
    int res = orig_blow(a);
    hook_postcall(&hook_blow);

    log("%s result = %x\n", __func__, res)
    return res;
}