From 6b9c8ac1eac576a9f79f996be1e432654db775fa Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 9 Sep 2004 21:47:32 +0000 Subject: [PATCH] Added dlsym handler --- plugins/dlsym | Bin 0 -> 5780 bytes plugins/dlsym.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 plugins/dlsym create mode 100755 plugins/dlsym.c diff --git a/plugins/dlsym b/plugins/dlsym new file mode 100755 index 0000000000000000000000000000000000000000..06fadd3815baeeb68e037e9fd4daa919023cd52e GIT binary patch literal 5780 zcmd^DUu+yl86W#D=@G2v9MY1|rmR3|T+wW7+|iN_oDUf z>241km8cGvCbe9HAA%@V5dj4?Z%`qsN=4!#M+$ku5=E4kDo6oclvYY5EBL|m`2A*f z>`m&Z;)NIH^xZeV`Toqe^MB^W)Np@OQtQVXo&<=tn?QG`vnaS$jVE@2e+kqJx&{2@5VJmk zen_K&Eyz|tN#IN1#QQ-8@SYHF1#buL2=OuSZs6q*kAbIwe;(o-_=Pj^1mkTL_lt+Y zbuy6o3TO=aJ>aZQpxtawHJI%=rIKF~wwLw%vLh^OV$v^IAA1XRcjsfyAIR?ZlFy?YqA9U926mRo3uQ zEog2m;zMU{&xc9sCaO=pf^|St4&2=GiQPllS`tqgO1*#qvxZJJPnqQH%r48)(n@cCznOA8-8a~%V}4fh4I5$ ze~D%F9SVkl-`qYA<@$U7ZZu|UX}6mOHvv||{#XHa$lUL_jOlUuj*Z5uKE?k=&@vlq zELIm*s^4f-me6~;jpu?#wSJwp7}xbyOo{p~M4^VWTst}U?v;*~GZW4}!}iK2CXM~M zyyqO)Bue9=A33Ao2S(1X6m0We=3>OnlpNcb^z8}^JU?SQwrLoHnF3b0ea6n>dJA{N z+nx5g463z_z?Yt2Uj7vGRZm5xQ;#k1FSRP9x&x^ zg1ARMxv$cbNqTbt}jo4=%1U(Ac3+e|w3(A3{?m%zvKBEm=^J7M*`SmBvE~B%( zy`!VOz0+vxbH?+Tf>A7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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); +} +