Skip to content

Instantly share code, notes, and snippets.

@NicolaiSoeborg
Created March 12, 2023 10:55
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 NicolaiSoeborg/da98284c268417a3a720728f4ef44094 to your computer and use it in GitHub Desktop.
Save NicolaiSoeborg/da98284c268417a3a720728f4ef44094 to your computer and use it in GitHub Desktop.
hook method in binary
#include <string.h>
/*
gcc -c -o hook.o hook.c
gcc -shared -o hook.so hook.o
LD_PRELOAD=./hook.so ./binary
*/
int getentropy(char *s, int size) {
memset(s, 0x41, size);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment