G:/ScriptBasic/source/hookers.c File Reference

#include <stdio.h>
#include "basext.h"
#include "sym.h"
#include "errcodes.h"
#include "report.h"
#include "lexer.h"
#include "expression.h"
#include "builder.h"
#include "memory.h"
#include "syntax.h"
#include "execute.h"
#include "myalloc.h"
#include "dynlolib.h"
#include "hookers.h"

Go to the source code of this file.

Defines

#define SET(x)   (*pHookers)->HOOK_##x = hook_##x

Functions

int hook_Init (pExecuteObject pEo, pHookFunctions *pHookers)
int hook_file_access (pExecuteObject pEo, char *pszFileName)
FILE * hook_fopen (pExecuteObject pEo, char *pszFileName, char *pszOpenMode)
void hook_fclose (pExecuteObject pEo, FILE *fp)
long hook_size (pExecuteObject pEo, char *pszFileName)
long hook_time_accessed (pExecuteObject pEo, char *pszFileName)
long hook_time_modified (pExecuteObject pEo, char *pszFileName)
long hook_time_created (pExecuteObject pEo, char *pszFileName)
int hook_isdir (pExecuteObject pEo, char *pszFileName)
int hook_isreg (pExecuteObject pEo, char *pszFileName)
int hook_exists (pExecuteObject pEo, char *pszFileName)
int hook_truncate (pExecuteObject pEo, FILE *fp, long lNewFileSize)
int hook_fgetc (pExecuteObject pEo, FILE *fp)
int hook_ferror (pExecuteObject pEo, FILE *fp)
int hook_fread (pExecuteObject pEo, char *buf, int size, int count, FILE *fp)
void hook_setmode (pExecuteObject pEo, FILE *fp, int mode)
void hook_binmode (pExecuteObject pEo, FILE *fp)
void hook_textmode (pExecuteObject pEo, FILE *fp)
int hook_fwrite (pExecuteObject pEo, char *buf, int size, int count, FILE *fp)
int hook_fputc (pExecuteObject pEo, int c, FILE *fp)
int hook_flock (pExecuteObject pEo, FILE *fp, int iLockType)
int hook_lock (pExecuteObject pEo, FILE *fp, int iLockType, long lStart, long lLength)
int hook_feof (pExecuteObject pEo, FILE *fp)
int hook_mkdir (pExecuteObject pEo, char *pszDirectoryName)
int hook_rmdir (pExecuteObject pEo, char *pszDirectoryName)
int hook_remove (pExecuteObject pEo, char *pszFileName)
int hook_deltree (pExecuteObject pEo, char *pszDirectoryName)
int hook_MakeDirectory (pExecuteObject pEo, char *pszDirectoryName)
DIR * hook_opendir (pExecuteObject pEo, char *pszDirectoryName, tDIR *pDirectory)
dirent * hook_readdir (pExecuteObject pEo, DIR *pDirectory)
void hook_closedir (pExecuteObject pEo, DIR *pDirectory)
void hook_sleep (pExecuteObject pEo, long lSeconds)
int hook_curdir (pExecuteObject pEo, char *Buffer, unsigned long cbBuffer)
int hook_chdir (pExecuteObject pEo, char *Buffer)
int hook_chown (pExecuteObject pEo, char *pszFileName, char *pszOwner)
int hook_SetCreateTime (pExecuteObject pEo, char *pszFileName, long lTime)
int hook_SetModifyTime (pExecuteObject pEo, char *pszFileName, long lTime)
int hook_SetAccessTime (pExecuteObject pEo, char *pszFileName, long lTime)
int hook_gethostname (pExecuteObject pEo, char *pszBuffer, long cbBuffer)
int hook_gethost (pExecuteObject pEo, char *pszBuffer, struct hostent *pHost)
int hook_tcpconnect (pExecuteObject pEo, SOCKET *sClient, char *pszRemoteSocket)
int hook_tcpsend (pExecuteObject pEo, SOCKET sClient, char *pszBuffer, long cbBuffer, int iFlags)
int hook_tcprecv (pExecuteObject pEo, SOCKET sClient, char *pszBuffer, long cbBuffer, int iFlags)
int hook_tcpclose (pExecuteObject pEo, SOCKET sClient)
int hook_killproc (pExecuteObject pEo, long pid)
int hook_getowner (pExecuteObject pEo, char *pszFileName, char *pszOwnerBuffer, long cbOwnerBuffer)
char * hook_fcrypt (pExecuteObject pEo, char *buf, char *salt, char *buff)
long hook_CreateProcess (pExecuteObject pEo, char *pszCommandLine)
long hook_CreateProcessEx (pExecuteObject pEo, char *pszCommandLine, long lTimeOut, unsigned long *plPid, unsigned long *plExitCode)
int hook_waitpid (pExecuteObject pEo, long pid, unsigned long *plExitCode)
int hook_CallScribaFunction (pExecuteObject pEo, unsigned long lStartNode, pFixSizeMemoryObject *pArgument, unsigned long NumberOfPassedArguments, pFixSizeMemoryObject *pFunctionResult)


Define Documentation

#define SET  )     (*pHookers)->HOOK_##x = hook_##x
 

Referenced by hook_Init().


Function Documentation

void hook_binmode pExecuteObject  pEo,
FILE *  fp
 

Definition at line 556 of file hookers.c.

References file_binmode().

int hook_CallScribaFunction pExecuteObject  pEo,
unsigned long  lStartNode,
pFixSizeMemoryObject *  pArgument,
unsigned long  NumberOfPassedArguments,
pFixSizeMemoryObject *  pFunctionResult
 

Definition at line 1048 of file hookers.c.

References COMMAND_ERROR_MEMORY_LOW, i, iError, memory_DupVar(), memory_NewArray(), nItem, NULL, SaveErrorGoto, SaveErrorResume, SavefErrorGoto, SaveFunctionResultPointer, and SaveStepCounter.

int hook_chdir pExecuteObject  pEo,
char *  Buffer
 

Definition at line 797 of file hookers.c.

int hook_chown pExecuteObject  pEo,
char *  pszFileName,
char *  pszOwner
 

Definition at line 810 of file hookers.c.

void hook_closedir pExecuteObject  pEo,
DIR *  pDirectory
 

Definition at line 756 of file hookers.c.

long hook_CreateProcess pExecuteObject  pEo,
char *  pszCommandLine
 

Definition at line 999 of file hookers.c.

long hook_CreateProcessEx pExecuteObject  pEo,
char *  pszCommandLine,
long  lTimeOut,
unsigned long *  plPid,
unsigned long *  plExitCode
 

Definition at line 1011 of file hookers.c.

int hook_curdir pExecuteObject  pEo,
char *  Buffer,
unsigned long  cbBuffer
 

Definition at line 783 of file hookers.c.

int hook_deltree pExecuteObject  pEo,
char *  pszDirectoryName
 

Definition at line 697 of file hookers.c.

References file_deltree().

int hook_exists pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 474 of file hookers.c.

References file_exists().

void hook_fclose pExecuteObject  pEo,
FILE *  fp
 

Definition at line 367 of file hookers.c.

References file_fclose().

char* hook_fcrypt pExecuteObject  pEo,
char *  buf,
char *  salt,
char *  buff
 

Definition at line 985 of file hookers.c.

int hook_feof pExecuteObject  pEo,
FILE *  fp
 

Definition at line 642 of file hookers.c.

References file_feof().

int hook_ferror pExecuteObject  pEo,
FILE *  fp
 

Definition at line 514 of file hookers.c.

References file_ferror().

int hook_fgetc pExecuteObject  pEo,
FILE *  fp
 

Definition at line 502 of file hookers.c.

References file_fgetc().

int hook_file_access pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 336 of file hookers.c.

int hook_flock pExecuteObject  pEo,
FILE *  fp,
int  iLockType
 

Definition at line 612 of file hookers.c.

References file_flock().

FILE* hook_fopen pExecuteObject  pEo,
char *  pszFileName,
char *  pszOpenMode
 

Definition at line 348 of file hookers.c.

References file_fopen(), and NULL.

int hook_fputc pExecuteObject  pEo,
int  c,
FILE *  fp
 

Definition at line 598 of file hookers.c.

References file_fputc().

int hook_fread pExecuteObject  pEo,
char *  buf,
int  size,
int  count,
FILE *  fp
 

Definition at line 526 of file hookers.c.

References file_fread().

int hook_fwrite pExecuteObject  pEo,
char *  buf,
int  size,
int  count,
FILE *  fp
 

Definition at line 582 of file hookers.c.

References file_fwrite().

int hook_gethost pExecuteObject  pEo,
char *  pszBuffer,
struct hostent *  pHost
 

Definition at line 891 of file hookers.c.

int hook_gethostname pExecuteObject  pEo,
char *  pszBuffer,
long  cbBuffer
 

Definition at line 878 of file hookers.c.

int hook_getowner pExecuteObject  pEo,
char *  pszFileName,
char *  pszOwnerBuffer,
long  cbOwnerBuffer
 

Definition at line 971 of file hookers.c.

int hook_Init pExecuteObject  pEo,
pHookFunctions *  pHookers
 

Definition at line 233 of file hookers.c.

References alloc_Alloc(), COMMAND_ERROR_MEMORY_LOW, COMMAND_ERROR_SUCCESS, NULL, SET, and size.

Referenced by execute_InitStructure(), and main().

int hook_isdir pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 442 of file hookers.c.

References file_isdir().

int hook_isreg pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 458 of file hookers.c.

References file_isreg().

int hook_killproc pExecuteObject  pEo,
long  pid
 

Definition at line 959 of file hookers.c.

int hook_lock pExecuteObject  pEo,
FILE *  fp,
int  iLockType,
long  lStart,
long  lLength
 

Definition at line 626 of file hookers.c.

References file_lock().

int hook_MakeDirectory pExecuteObject  pEo,
char *  pszDirectoryName
 

Definition at line 713 of file hookers.c.

References file_MakeDirectory().

int hook_mkdir pExecuteObject  pEo,
char *  pszDirectoryName
 

Definition at line 655 of file hookers.c.

References file_mkdir().

DIR* hook_opendir pExecuteObject  pEo,
char *  pszDirectoryName,
tDIR *  pDirectory
 

Definition at line 729 of file hookers.c.

References file_opendir().

struct dirent* hook_readdir pExecuteObject  pEo,
DIR *  pDirectory
 

Definition at line 743 of file hookers.c.

int hook_remove pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 681 of file hookers.c.

References file_remove().

int hook_rmdir pExecuteObject  pEo,
char *  pszDirectoryName
 

Definition at line 668 of file hookers.c.

References file_rmdir().

int hook_SetAccessTime pExecuteObject  pEo,
char *  pszFileName,
long  lTime
 

Definition at line 861 of file hookers.c.

int hook_SetCreateTime pExecuteObject  pEo,
char *  pszFileName,
long  lTime
 

Definition at line 827 of file hookers.c.

void hook_setmode pExecuteObject  pEo,
FILE *  fp,
int  mode
 

Definition at line 542 of file hookers.c.

References file_setmode().

int hook_SetModifyTime pExecuteObject  pEo,
char *  pszFileName,
long  lTime
 

Definition at line 844 of file hookers.c.

long hook_size pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 379 of file hookers.c.

References file_size().

void hook_sleep pExecuteObject  pEo,
long  lSeconds
 

Definition at line 770 of file hookers.c.

int hook_tcpclose pExecuteObject  pEo,
SOCKET  sClient
 

Definition at line 947 of file hookers.c.

int hook_tcpconnect pExecuteObject  pEo,
SOCKET *  sClient,
char *  pszRemoteSocket
 

Definition at line 904 of file hookers.c.

int hook_tcprecv pExecuteObject  pEo,
SOCKET  sClient,
char *  pszBuffer,
long  cbBuffer,
int  iFlags
 

Definition at line 932 of file hookers.c.

int hook_tcpsend pExecuteObject  pEo,
SOCKET  sClient,
char *  pszBuffer,
long  cbBuffer,
int  iFlags
 

Definition at line 917 of file hookers.c.

void hook_textmode pExecuteObject  pEo,
FILE *  fp
 

Definition at line 569 of file hookers.c.

References file_textmode().

long hook_time_accessed pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 394 of file hookers.c.

References file_time_accessed().

long hook_time_created pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 426 of file hookers.c.

References file_time_created().

long hook_time_modified pExecuteObject  pEo,
char *  pszFileName
 

Definition at line 410 of file hookers.c.

References file_time_modified().

int hook_truncate pExecuteObject  pEo,
FILE *  fp,
long  lNewFileSize
 

Definition at line 489 of file hookers.c.

References file_truncate().

int hook_waitpid pExecuteObject  pEo,
long  pid,
unsigned long *  plExitCode
 

Definition at line 1026 of file hookers.c.


Generated on Sun Mar 12 23:56:37 2006 for ScriptBasic by  doxygen 1.4.6-NO