diff --git a/plugins/dlsym b/plugins/dlsym new file mode 100755 index 00000000..06fadd38 Binary files /dev/null and b/plugins/dlsym differ diff --git a/plugins/dlsym.c b/plugins/dlsym.c new file mode 100755 index 00000000..d827b768 --- /dev/null +++ b/plugins/dlsym.c @@ -0,0 +1,40 @@ +/* by David "BAILOPAN" Anderson + * No warranties of any kind + * License: I hereby grant this work to the public domain and make no copyright claims. + */ +#include +#include +#include + +int main(int argc, char **argv) +{ + char *file=NULL; + void *dl= NULL; + FILE *fp = NULL; + if (argc != 2) + { + printf("Usage: dlsym \n"); + exit(0); + } + file = argv[1]; + fp = fopen(file, "rb"); + if (!fp) + { + printf("File not found."); + exit(0); + } + + dl = dlopen(file, RTLD_NOW); + + if (dl) + { + printf("Shared module loaded. Handle: %p\n", dl); + dlclose(dl); + dl = NULL; + } else { + printf("Shared module failed to load: %s\n", dlerror()); + } + + exit(0); +} +