This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

interesting question about windrop security

Old posts that have not been replied to for several years.
Locked
v
virtuoso
Halfop
Posts: 90
Joined: Fri May 16, 2003 6:52 pm

interesting question about windrop security

Post by virtuoso »

i have a net with 10 computers. each computer shares the "c" drive to every1 on the net,with full permissions. i've created a folder inside each shared pc located in c:\windows\windrop with the windrop files inside. To avoid the problem that peoples could change them,i've found a program called folder guard. With it i can setup "special" read only files or folders.

Windrop starts from a bat file with these commands inside :

cd \windows\windrop
fgkey /E
dllhosts.exe -n v4.conf (-n is necessary to avod the Tcl error: couldn't duplicate input handle: bad file number' ,described here :

http://windrop.sourceforge.net/windropf ... r'%20error

as u can see,when it starts,the protection is activated with the command FGkey /E and can be stopped with the command FGkey /D password.
The problem is that when i log in DCC and i want to make changes to the user/chan file,i can't because these files are protected. For this reason I need to deactivate the protection by running the command FGkey /D password using the DCC,but I need to reactivate it as soon as possible after the changes has been written. i've tought to load a tcl like this :

(thanks to crazycat,he is good)

# the dcc command
bind dcc m "unprotect" uf:unprot

# this is the local userfile
set myfile "C:\\WINDOWS\\windrop\\v4.user"
# this is the FGkey program
set FGkey "c:\\WINDOWS\\windrop\\FGkey.exe"
# this is the password
set pass "password"

proc uf:unprot { handle idx arg } {
# you want to edit it, so unlock
list [exec "$::FGkey \/D $::pass"]
# and prepare the next .save
bind evnt - save uf:lock
}

proc uf:copy { type } {
# file is saved, relock it
list [exec "$::FGkey \/E"]
# and we don't need to re-lock after
unbind evnt - save uf:lock
}

but don't works,because the protection is not de-activated and i can't write the changes to the user file because inside the shell window I see the error : Error writing user file. fixes ? thanks

fixes ? thanks.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Probably the only problem is you're using
  • with exec. Try getting rid of that part and using exec directly.
v
virtuoso
Halfop
Posts: 90
Joined: Fri May 16, 2003 6:52 pm

sss

Post by virtuoso »

something like this ?

exec "$::FGkey \/D $::pass"
v
virtuoso
Halfop
Posts: 90
Joined: Fri May 16, 2003 6:52 pm

fggggg

Post by virtuoso »

how can i see if there is a tcl error ? i don't remember how i had configured the console to display these kind of errors some time ago.
btw i think that there are no tcl errors,as u can see :

<aalina> [17:54] tcl: builtin dcc call: *dcc:save Draven 5
<aalina> [17:54] #Draven# save
<aalina> Saving user file...
<aalina> [17:54] ERROR writing user file.

in the configuration file (v4.conf) at the bottom ,i have :

source virtuoso2.tcl

inside the virtuoso2.tcl there is the code that i've already displayed.

i've edited a stand alone bat file with :

FGkey /D:password

and when i run it the protection is de-activated....
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

You did type .unprotect first, right? Add a putlog to the uf:unprot to make sure it's all being executed, like after the exec: putlog "unprotected file"

Also, I just noticed another error. In uf:unprot it makes a bind with the proc uf:lock, but it should be uf:copy (although the other name makes more sense).
v
virtuoso
Halfop
Posts: 90
Joined: Fri May 16, 2003 6:52 pm

ddd

Post by virtuoso »

something like this ?

# the dcc command
bind dcc m "unprotect" uf:unprot
putlog "v4.user"

# this is the local userfile
set myfile "C:\\WINDOWS\\bottolo\\v4.user"
# this is the FGkey program
set FGkey "c:\\WINDOWS\\bottolo\\FGkey.exe"
# this is the password
set pass "pass"

proc uf:load { type } {
# bot loaded, we need to lock the file
exec "$::FGkey \/E"
}

proc uf:unprot { handle idx arg } {
# you want to edit it, so unlock
exec "$::FGkey \/D $::pass"
putlog "v4.user"
# and prepare the next .save
bind evnt - save uf:copy
}

proc uf:copy { type } {
# file is saved, relock it
#list [exec "$::FGkey \/E $::myfile"]
exec "$::FGkey \/E"
# and we don't need to re-lock after
unbind evnt - save uf:lock
}
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Ya something like that.. so does it say v4.user when you type .unprotect, or give a tcl error?
v
virtuoso
Halfop
Posts: 90
Joined: Fri May 16, 2003 6:52 pm

fgfggf

Post by virtuoso »

errata corrige :

<Virtuolo> .unprotect
Tcl error [uf:unprot]: couldn't execute "c:\WINDOWS\bottolo\FGkey.exe \D pass": no such file or directory
Last edited by virtuoso on Sat Mar 06, 2004 11:26 am, edited 2 times in total.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Try putting those as separate arguments, like

exec fgkey "/d" "pass"
Locked