Created
September 4, 2017 03:24
-
-
Save timb-machine/e9d0150a13e8a86732a1bdba58f7d788 to your computer and use it in GitHub Desktop.
sorun.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <dlfcn.h> | |
#include <stdio.h> | |
int main(int argc, char **argv) { | |
void *libraryhandle; | |
int (*functionpointer)(void *, void *, void *, void *, void *, void *, void *, void *, void *); | |
int functionresult; | |
libraryhandle = dlopen(argv[1], RTLD_NOW); | |
functionpointer = dlsym(libraryhandle, argv[2]); | |
functionresult = functionpointer(argv[3] ? argv[3] : NULL, argv[4] ? argv[4] : NULL, argv[5] ? argv[5] : NULL, argv[6] ? argv[6] : NULL, argv[7] ? argv[7] : NULL, argv[8] ? argv[8] : NULL, argv[9] ? argv[9] : NULL, argv[10] ? argv[10] : NULL, argv[11] ? argv[11] : NULL); | |
dlclose(libraryhandle); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment