darkone
09-16-2003, 02:41 AM
- gupdated list below-
... I have currently registered these procs to be seeked with internal GetProc function (provided to module on load) Is there something else you might find useful? (VFS & online data functions will be added to list)
b>d>>s
09-16-2003, 07:26 AM
just curious about itcl implementation, if any ? :D
darkone
09-22-2003, 04:31 PM
// Memory procs
dwResult += RegisterProc("Allocate", _Allocate);
dwResult += RegisterProc("ReAllocate", _ReAllocate);
dwResult += RegisterProc("Free", _Free);
// Config procs
dwResult += RegisterProc("Config_Read", Config_Read);
dwResult += RegisterProc("Config_Write", Config_Write);
dwResult += RegisterProc("Config_Get", Config_Get);
dwResult += RegisterProc("Config_GetInt", Config_Get_Int);
dwResult += RegisterProc("Config_GetBool", Config_Get_Bool);
dwResult += RegisterProc("Config_GetPath", Config_Get_Path);
dwResult += RegisterProc("Config_GetSection", Config_Get_Section);
dwResult += RegisterProc("Config_GetLinear", Config_Get_Linear);
dwResult += RegisterProc("Config_GetPermission", Config_Get_Permission);
// Synchronization procs
dwResult += RegisterProc("InitalizeLockObject", InitializeLockObject);
dwResult += RegisterProc("DeleteLockObject", DeleteLockObject);
dwResult += RegisterProc("AcquireSharedLock", AcquireSharedLock);
dwResult += RegisterProc("ReleaseSharedLock", ReleaseSharedLock);
dwResult += RegisterProc("AcquireExclusiveLock", AcquireExclusiveLock);
dwResult += RegisterProc("ReleaseExclusiveLock", ReleaseExclusiveLock);
// User procs
dwResult += RegisterProc("CreateUser", CreateUser);
dwResult += RegisterProc("RenameUser", RenameUser);
dwResult += RegisterProc("DeleteUser", DeleteUser);
dwResult += RegisterProc("Uid2User", Uid2User);
dwResult += RegisterProc("User2Uid", User2Uid);
// UserFile procs
dwResult += RegisterProc("UserFile_Open", UserFile_Open);
dwResult += RegisterProc("UserFile_OpenPrimitive", UserFile_OpenPrimitive);
dwResult += RegisterProc("UserFile_Lock", UserFile_Lock);
dwResult += RegisterProc("UserFile_Unlock", UserFile_Lock);
dwResult += RegisterProc("UserFile_Close", UserFile_Close);
dwResult += RegisterProc("FindFirstUser", FindFirstUser);
dwResult += RegisterProc("FindNextUser", FindNextUser);
// Group procs
dwResult += RegisterProc("CreateGroup", CreateGroup);
dwResult += RegisterProc("RenameGroup", RenameGroup);
dwResult += RegisterProc("DeleteGroup", DeleteGroup);
dwResult += RegisterProc("Gid2Group", Gid2Group);
dwResult += RegisterProc("Group2Gid", Group2Gid);
// GroupFile procs
dwResult += RegisterProc("GroupFile_Open", GroupFile_Open);
dwResult += RegisterProc("GroupFile_OpenPrimitive", GroupFile_OpenPrimitive);
dwResult += RegisterProc("GroupFile_Lock", GroupFile_Lock);
dwResult += RegisterProc("GroupFile_Unlock", GroupFile_Lock);
dwResult += RegisterProc("GroupFile_Close", GroupFile_Close);
// Timer procs
dwResult += RegisterProc("StartIoTimer", StartIoTimer);
dwResult += RegisterProc("StopIoTimer", StopIoTimer);
// String procs
dwResult += RegisterProc("SplitString", SplitString);
dwResult += RegisterProc("ConcatString", ConcatString);
dwResult += RegisterProc("GetStringIndex", GetStringIndex);
dwResult += RegisterProc("GetStringRange", GetStringRange);
dwResult += RegisterProc("FreeString", FreeString);
// Vfs procs
dwResult += RegisterProc("VFS_Access", VFS_Access);
dwResult += RegisterProc("VFS_Insert", VFS_Insert);
dwResult += RegisterProc("VFS_Retrieve", VFS_Retrieve);
dwResult += RegisterProc("VFS_AddContext", VFS_AddContext);
dwResult += RegisterProc("VFS_FindContext", VFS_FindContext);
dwResult += RegisterProc("VFS_FreeContext", VFS_FreeContext);
dwResult += RegisterProc("VFS_DeleteContext", VFS_DeleteContext);
// File procs
dwResult += RegisterProc("ioOpenFile", ioOpenFile);
dwResult += RegisterProc("ioCloseFile", ioCloseFile);
dwResult += RegisterProc("ioReadFile", ioReadFile);
dwResult += RegisterProc("ioWriteFile", ioWriteFile);
dwResult += RegisterProc("ioSeekFile", ioSeekFile);
// Socket procs
dwResult += RegisterProc("ioSend", ioSend);
dwResult += RegisterProc("ioRecv", ioRecv);
dwResult += RegisterProc("ioCloseSocket", ioCloseSocket);
dwResult += RegisterProc("Secure_SendResult", Secure_SendResult);
dwResult += RegisterProc("Secure_ReceiveResult", Secure_ReceiveResult);
// Mountfile handling
dwResult += RegisterProc("MountFile_Open", MountFile_Open);
dwResult += RegisterProc("MountFile_Close", MountFile_Close);
// Virtual path handling
dwResult += RegisterProc("PWD_CWD", PWD_CWD);
dwResult += RegisterProc("PWD_GetTable", PWD_GetTable);
dwResult += RegisterProc("PWD_Copy", PWD_Copy);
dwResult += RegisterProc("PWD_Free", PWD_Free);
dwResult += RegisterProc("PWD_Resolve", PWD_Resolve);
// Job managment
dwResult += RegisterProc("JobQueue", JobQueue);
dwResult += RegisterProc("QueueClientJobEx", QueueClientJobEx);
dwResult += RegisterProc("QueueIoEx", QueueIoEx);
dwResult += RegisterProc("EndJob", EndJob);
dwResult += RegisterProc("StartJobTimer", StartJobTimer);
dwResult += RegisterProc("StopJobTimer", StopJobTimer);
dwResult += RegisterProc("SetJobFilter", SetJobFilter);
// Misc procs
dwResult += RegisterProc("Putlog", Putlog);
dwResult += RegisterProc("GetUserData", GetUserData);
dwResult += RegisterProc("BindCompletionPort", BindCompletionPort);
This list includes nearly everything that one might need :) Only thing you should remember when using these, is that you should recompile your script on every version of ioFTPD (as these function prototypes may change, and if you do incorrect call - it will result to buffer overrun => exploit/crash)
Ps. Do not expect me to document these any time soon - there's nearly 100 of them :)
FTPServerTools
09-22-2003, 08:55 PM
Yes I would love to see some standard routines to get the users file or routines that do GetUsers(char **UserList) and GetGroups(char **GroupList) or something like that. Also with the ability to influence the reply back. THat would be suficient in loop like:
for all possible users in io {
do something
}
etc..
Or do I have to do that via the config routines?
darkone
09-23-2003, 02:41 AM
GetUsers = FindFirstUser + FindNextUser...
if ((hSearch = FindFirstUser("*", &lpUserFile)))
{
do
{
} while (! FindNextUser(hSearch, &lpUserFile));
}
I can't see reason to have such for groups :i
FTPServerTools
09-23-2003, 03:01 AM
Thx. For groups I could see that as well but alas that is of lesser importance.
darkone
09-24-2003, 04:51 PM
k.. I added GetUsers & GetGroups, which both allocate memory, and return table of ids (PINT32) (sorted by name) & table size (DWORD)... it allocates memory from ioftpd's uber routines, so one should use "Free" procedure provided, for freeing the array.
GOD-EMPEROR
09-24-2003, 10:59 PM
I just hope the itcl engine will have internal access to all of those useful functions soon :)
add: it is not very elegant to have to exec external utils to read things internal to the ftpd from itcl.... also needless loading overhead
b>d>>s
09-25-2003, 06:30 AM
w0w, i actually agree with GOD-EMPEROR ..
darkone
09-25-2003, 08:14 AM
I doubt you'll see all the stuff listed here in itcl.. just too much work (implementation of these was just matter of writing database adding & seeking routines)
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.