Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Created March 8, 2022 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WietseWind/6d18dc27430007304ef729ca0d2d14ea to your computer and use it in GitHub Desktop.
Save WietseWind/6d18dc27430007304ef729ca0d2d14ea to your computer and use it in GitHub Desktop.
Sample Hook
/**
* This hook just accepts any transaction coming through it
*/
#include "hookapi.h"
int64_t cbak(int64_t reserved) {
return 0;
}
int64_t hook(int64_t reserved ) {
TRACESTR("Accept.c: Called.");
accept (0,0,0);
_g(1,1); // every hook needs to import guard function and use it at least once
// unreachable
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment