I dont understand what this string is alpha/integer/index is and what it does. Can someone explain? Then maybe i could start making such a script and test it.
Last edited by r0t3n on Thu Jul 21, 2005 3:19 pm, edited 1 time in total.
varible drone(bantime) "30"
setudef flag pjenscan
setudef flag dronescan
setudef str pjenjoins
setudef str pjendetected
setudef str pjenkicked
setudef str dronejoins
setudef str dronedetected
setudef str dronekicked
bind join - * ap:check
bind join - * drone:check
proc drone:check {nick uhost hand chan} {
if {![chanel get $chan "dronescan"]} {
return 0
}
if {[matchattr $hand nmof|nmof $chan]} {
return 0
}
if {[string match "*quakenet.org" $uhost]} {
return 0
}
if {[string is alpha $nick] || [string match *\[-^`_\]* $nick]} {
return 0
}
scan $uhost %\[^@\]@%s ident host
if {([string match -nocase "*[set sident [string trimleft $ident ~]]*" $nick]) && ([string is alpha [string range $nick 0 3]]) && ([string is integer [string range $nick end-1 end]]) && ([string is integer [string index $sident end]]) && ([string index $ident 0] == "~")} {
putquick "KICK $chan $nick :You have been detected as a drone. \(ID: [channel get $chan "dronedetected"]\). If you think this is a mistake, please type: /msg $::botnick im not infected!! to be removed from the database."
putquick "MODE $chan +b $uhost"
newchanban $chan $uhost $::botnick "You have been detected as a drone. \(ID: [channel get $chan "dronedetected"]\). If you think this is a mistake, please type: /msg $::botnick im not infected!! to be removed from the database." $::drone(bantime)
utimer $::drone(bantime) putserv "MODE $chan -b $uhost"; putserv "PRIVMSG $nick :You have been unbanned from $chan."
set fp [open drones.db a]
puts $fp $nick $uhost $::time $::date $::botnick
close $fp
putloglev D * "$nick \($uhost\) detected as a drone and added to the database \($::time $::date\) \($::botnick\) ."
}
}
Thats what i have just made for a simple drone detection script. Dont know if it will work. Didnt understand the integer stuff so i hope you dont mid Sir_Fz me coping most of your script. Can anyone help me script a more advanced one also a trojan detection script. Im a noob at TCL, but atleast im trying to make a antipjen-drone-proxy script for all users to use. Totally public for all to use, not like aspb. Thanks for all your help so far aswell ;p (^-^)
I'm sure you can come up with some random nicknames and test it on yourself. And if you need such a script i'm sure you will also have some random nicks from that
My code simply detects nicks that match the following standards:
Nick and ident are equal (or atleast the ident exists in the nick)
The first 4 letters of the nick are alpha [A-z]
The last 2 letters of the nick are integers [0-9]
The last letter of the ident is an integer
and the first character of the ident is '~' (unresolved idents)
but it first checks if the nick is all alpha (has no numbers or other symbols) or if it contains one of "-^`_", if it does then it won't check for the above.