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.

Antipjen-drone script

Old posts that have not been replied to for several years.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

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.
r0t3n @ #r0t3n @ Quakenet
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

he use string index to see if parts of the nick is normal chars [a-Z] (alpha) or numbers (integer). read up on string here.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

so

Code: Select all

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 (^-^)
r0t3n @ #r0t3n @ Quakenet
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

If you don't know if it works, try testing it.

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 :roll:
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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.
Locked