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 05-22-2003, 06:25 PM   #1
ProlyX
Member
 
Join Date: Nov 2002
Posts: 39
Default help needed.. little code snippet in cpp

hi,

can someone write little cpp snippet for me that following do..

user exec a command.. like site ginfo <group>.. (i know Mouten does already nice one.. but i want little changes and need that for that)

so the script should do following..

get uid from uid flags.. check if user has +G and is in grp arg1..
if yea.. <insert code here..> if not return You Dont have access.. etc

i hope someone understand it.. i would build it in in the cpp of ginfo that i can coutinue that.

tnx
ProlyX is offline  
Old 05-22-2003, 07:44 PM   #2
neXus
Member
 
Join Date: Apr 2003
Posts: 47
Default

fot better understand ..
only users with group flag G should have acces to grpnfo command ?
neXus is offline  
Old 05-22-2003, 08:19 PM   #3
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

void main(int argc,char *argv[])
{
if (strstr(getenv("GROUPS"),argv[1]) && strchr(getenv("FLAGS"),"+") && strchr(getenv("FLAGS"),"G")){
<insert code here>
}
}

Just use the environment vars it is the easy way.
Example env vars:
200-ACCSPEED=0.0000
200-COMSPEC=C:\WINDOWS\System32\cmd.exe
200-FLAGS=1MTH
200-GID=0
200-GROUP=ioftpd
200-GROUPS=ioftpd
200-PATH=d:\ioFTPD\site
200-PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS
200-PROMPT=$P$G
200-PWD=/
200-SECTION=0
200-SPEED=0
200-TAGLINE=Speed of light
200-UID=0
200-USER=ioFTPD
200 Command Successful.


Put your own checking code in
FTPServerTools is offline  
Old 05-23-2003, 04:47 AM   #4
ProlyX
Member
 
Join Date: Nov 2002
Posts: 39
Default

Thank You (and cala, dasop etc from chat, too )
ProlyX is offline  
Closed Thread

Tags
cpp, ginfo, snippet, uid, user


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
Congratulations Jesper General Discussion 0 07-31-2004 07:11 AM


All times are GMT -5. The time now is 07:00 AM.

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