Skip to content

Instantly share code, notes, and snippets.

@reuben
Created June 6, 2011 22:46
Show Gist options
  • Save reuben/1011285 to your computer and use it in GitHub Desktop.
Save reuben/1011285 to your computer and use it in GitHub Desktop.
VIPER, Y U NO SCAN SIGNATURE
#else /* !WIN32 */
/* We must load in the binary to allow access to it.
* Thanks to your-name-here for that bit of info!
*/
if (dlopen("libpython2.5.so.1.0", RTLD_NOW) == NULL)
{
strncpy(error, "Unable to load libpython2.5.so.1.0", maxlength);
return false;
}
Dl_info info;
if (dladdr((void*)g_SMAPI->GetServerFactory(false), &info) == 0)
{
strncpy(error, "Could not find SendProxy_EHandleToInt (1): entity property type "
"autodetection would fail without it. Unloading.", maxlength);
return false;
}
void *handle = dlopen(info.dli_fname, RTLD_NOW);
if (handle == NULL)
{
strncpy(error, "Could not find SendProxy_EHandleToInt (2): entity property type "
"autodetection would fail without it. Unloading.", maxlength);
return false;
}
_Z22SendProxy_EHandleToIntPK8SendPropPKvS3_P8DVariantii
g_pSendProxy_EHandleToInt = memutils->ResolveSymbol(handle, "_Z22SendProxy_EHandleToIntPK8SendPropPKvS3_P8DVariantii");
dlclose(handle);
if (g_pSendProxy_EHandleToInt == NULL)
{
strncpy(error, "Could not find SendProxy_EHandleToInt (3): entity property type "
"autodetection would fail without it. Unloading.", maxlength);
return false;
}
#endif
$ grep -sn SendProxy_EHandleToInt server.so.objdump
1940625:007e4457 <_Z22SendProxy_EHandleToIntPK8SendPropPKvS3_P8DVariantii>:
sm exts load viper
[SM] Extension viper.ext.so failed to load: Could not find SendProxy_EHandleToInt (3): entity property type autodetection would fail without it. Unloading.
____
< ur >
----
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment