Created
June 24, 2015 02:51
-
-
Save ba0f3/a972d9acbe4cb785afe3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <dlfcn.h> | |
int main() { | |
void *handle; | |
char* (*processSequence)(const char *); | |
handle = dlopen("../libbogo.so", RTLD_LAZY); | |
if (!handle) { | |
printf("Unable to open library: %s\n", dlerror()); | |
return 1; | |
} | |
*(void **)(&processSequence) = dlsym(handle, "processSequenceVni"); | |
printf("%s\n", (*processSequence)("To6i ye6u Vie65t Nam")); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment