Go Back   FlashFXP Forums > >

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 09-16-2003, 02:41 AM   #1
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default Modules general

- 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)
darkone is offline  
Old 09-16-2003, 07:26 AM   #2
b>d>>s
Senior Member
 
Join Date: Feb 2003
Posts: 488
Default

just curious about itcl implementation, if any ?
b>d>>s is offline  
Old 09-16-2003, 11:53 AM   #3
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

haha
Mouton is offline  
Old 09-22-2003, 04:31 PM   #4
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

// 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
darkone is offline  
Old 09-22-2003, 08:55 PM   #5
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

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?
FTPServerTools is offline  
Old 09-23-2003, 02:41 AM   #6
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

GetUsers = FindFirstUser + FindNextUser...


if ((hSearch = FindFirstUser("*", &lpUserFile)))
{
do
{
} while (! FindNextUser(hSearch, &lpUserFile));
}

I can't see reason to have such for groups :i
darkone is offline  
Old 09-23-2003, 03:01 AM   #7
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

Thx. For groups I could see that as well but alas that is of lesser importance.
FTPServerTools is offline  
Old 09-24-2003, 04:51 PM   #8
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

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.
darkone is offline  
Old 09-24-2003, 10:59 PM   #9
GOD-EMPEROR
Member
ioFTPD Registered User
 
Join Date: Sep 2002
Posts: 42
Post

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
GOD-EMPEROR is offline  
Old 09-25-2003, 06:30 AM   #10
b>d>>s
Senior Member
 
Join Date: Feb 2003
Posts: 488
Default

w0w, i actually agree with GOD-EMPEROR ..
b>d>>s is offline  
Old 09-25-2003, 08:14 AM   #11
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

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)
darkone is offline  
Closed Thread

Tags
added, find, functions, list, load

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compatability problems? darkone Bug Reports 0 01-06-2003 05:26 PM


All times are GMT -5. The time now is 10:58 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)