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.

Only specified users may use .+user command

Old posts that have not been replied to for several years.
s
sipko

Post by sipko »

Can some tell me where can I find (or hints to write) a tcl script wich disables bot users to add a new user. It is not important what their flags are.

So there must be a database or somethin' with nick who may add users.
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

I guess you could use the filt command for this.

the code would be something like this:

Code: Select all

# users that can use the +user command
set allowed "user1 user2"

bind filt - ".+user" +user:check
proc +user:check {idx args} {
global allowed
 set usernick [idx2hand $idx]
 if {[lindex $args 1] == ""} {
  set icmd [lindex $args 0]
  set args "$icmd "
 }
 if {[lsearch -exact [string tolower $allowed] [string tolower $usernick]] == -1} { 
  putdcc $idx "What? You need '.help'"
 } else {
  return $args
 }
}
this would only allow 'user1' and 'user2' to use the +user command
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Code: Select all

bind filt - ".+user" +user:check
Should be

Code: Select all

bind filt - ".+u* * *" +user:check
, otherwise you could bypass it with .+u <blah>
s
sipko

Post by sipko »

Huh, guys tnx!

I will test this right away.

But i found out that there is another problem. All users can .su to antoher user and then add user.

how can I enable .su with password protection?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

.su is password protected.

If memory serves me correct, only permanent owners (defined in the config file) can SU without using a password, all other users requir a password.
s
sipko

Post by sipko »

Oh, tnx!!
s
sipko

Post by sipko »

This is burjok.tcl script. I added it and then rehashed and restarted my bot. But still all (m&n) users may add people into the botnet. I have 2 bots on my botnet.

Have I made a mistake?
set allowed "SIPko burek12 kmeto"

bind filt - ".+u* * *" +user:check

proc +user:check {idx args} {

global allowed

set usernick [idx2hand $idx]

if {[lindex $args 1] == ""} {

set icmd [lindex $args 0]

set args "$icmd "

}


if {[lsearch -exact [string tolower $allowed] [string tolower $usernick]] == -1} {

putdcc $idx "What? You need '.help'"

} else {

return $args

}

}

putlog "burjok adduser skripta loaded:P"
<font size=-1>[ This Message was edited by: sipko on 2001-11-06 15:43 ]</font>

<font size=-1>[ This Message was edited by: sipko on 2001-11-06 15:45 ]</font>
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

After the line
putdcc $idx "What? You need '.help'"
Add the line
return ""
s
sipko

Post by sipko »

ok I managed the problem.. the problem was .+u* * * -> that has not solved the problem when I wrote .+user name .. and then later .+host

... I handeled that one;)
s
sipko

Post by sipko »

hm, ok... i will add this too...

Thank you for your help!
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

You also want to disable the .adduser command i'm sure.
s
sipko

Post by sipko »

Huh, indeed;)
tnx again!
s
sipko

Post by sipko »

Now I would like to add these commands into the forbidden list:

.-user
.adduser
.chattr
.die

Is this tho solution to my problem if I add these lines to this .+user script?:

bind filt - ".-u* * *" -user:check
bind filt - ".adduser* * *" adduser:check
bind filt - ".chattr* *" chattr:check
bind filt - ".die" die:check


and then what do I have to add to proc lines?

Please help me adding these commands to be restricted like +user.

Thanx
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

You can use the same proc for all of these, but chattr and adduser needed to be wild-card-ified :smile:

bind filt - ".-u* * *" +user:check
bind filt - ".addu* +user:check
bind filt - ".chatt* *" +user:check
bind filt - ".die" +user:check
s
sipko

Post by sipko »

huh, It works! Tnx ... I owe you a beer!;)
Locked