egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pjen

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Fri Apr 14, 2006 1:36 pm    Post subject: pjen Reply with quote

hi

Code:
Tcl error [pjen:check]: can't read "pjen": no such variable
Tcl error [pjen:nick]: can't read "pjen": no such variable



Code:
setudef flag pjen

setudef str pjendetected
setudef str pjenkicked
setudef str pjenjoin

bind join - * pjen:check
bind nick - * pjen:nick
bind pub - !trojan pub:pjen
bind pub - !pjen pub:pjen

proc pub:pjen {nick host hand chan arg} {
  set cmd [lindex [split $arg] 0]
  switch -exact -- [string tolower $cmd] {
    "on" {
      if {![matchattr $hand nmo|nmo $chan]} {
        putserv "NOTICE $nick :Error: You do not have access to this command."
        } else {
        if {[channel get $chan "pjen"]} {
          putserv "NOTICE $nick :Antipjen scan is already enabled for $chan."
          } else {
          putserv "NOTICE $nick :Antipjen scan is now enabled for $chan."
          channel set $chan +pjen
          putserv "PRIVMSG $chan :Antipjen scan is now enabled for this channel."
        }
      }
    }
    "off" {
      if {![matchattr $hand nmo|nmo $chan]} {
        putserv "NOTICE $nick :Error: You do not have access to this command."
        } else {
        if {![channel get $chan "pjen"]} {
          putserv "NOTICE $nick :Antipjen scan is already disabled for $chan."
          } else {
          putserv "NOTICE $nick :Antipjen scan is now disabled for $chan."
          channel set $chan -pjen
          putserv "PRIVMSG $chan :Antipjen scan is now disabled for this channel."
        }
      }
    }
    "stats" {
      if {([channel get $chan "pjenjoin"] == "")} {
        channel set $chan pjenjoin 0
      }
      if {([channel get $chan "pjendetected"] == "")} {
        channel set $chan pjendetected 0
      }
      if {([channel get $chan "pjenkicked"] == "")} {
        channel set $chan pjenkicked 0
      }
      putserv "NOTICE $nick :Antipjen stats for $chan."
      putserv "NOTICE $nick :Joins: [channel get $chan "pjenjoin"]"
      putserv "NOTICE $nick :Detected: [channel get $chan "pjendetected"]"
      putserv "NOTICE $nick :Kicked/Banned: [channel get $chan "pjenkicked"]"
      putserv "NOTICE $nick :End of Antipjen stats for $chan."
    }
    "default" {
      if {[channel get $chan "pjen"]} {
        set pjen_status enabled
        } else {
        set pjen_status disabled
      }
      putserv "NOTICE $nick :Antipjen scan for $chan is: $pjen_status."
      putserv "NOTICE $nick :Commands: !antipjen on|off|stats."
    }
  }
}

proc pjen:nick {nick host hand chan newnick} {
  if {![isbotnick $nick] || ![string equal -nocase $nick $newnick]} {
    pjen:check $newnick $host $hand $chan
  }
}

proc pjen:check {nick host hand chan} {
  if {![channel get $chan "pjen"]} {
    return 0
  }
  if {[matchattr $hand nmoT|nmof $chan]} {
    return 0
  }
  if {[string match "*quakenet.org" $host]} {
    return 0
  }
  variable pjen-check "1"
  set pjen-nick "$nick"
  if {${pjen-check}} {
    if {[string is alpha $pjen-nick]} {
      return 0
    }
    if {[string match "*\[{}()^*|-_`\]" $pjen-nick]} {
      return 0
    }
    scan $uhost %\[^@\]@%s ident host
    set pjen-host $host
    set pjen-newhost *!*[lindex [split $pjen-host @]  1]
    set pjen-ident $ident
    set pjen-newident [string trimleft $pjen-ident ~]
    if {[string match "*$pjen-newident*" $pjen-nick] || [string match "*$pjen-nick*" $pjen-newident]} {
      set pjen-method "Nick/Ident matching"
      incr $pjen(joined,$chan); channel set $chan pjenjoined $pjen(joined,$chan)
      incr $pjen(detected,$chan); channel set $chan pjendetected $pjen(detected,$chan)
      if {[botisop $chan]} {
        incr $pjen(kicked,$chan); channel set $chan pjenkicked $pjen(kicked,$chan)
        set pjen-kickmsg "Pjen infected drone. Detection method: $pjen-method ID: [channel get $chan pjenkicked]"
        putquick "KICK $chan $pjen-nick $pjen-kickmsg"
        newchanban $chan $pjen-newhost $::botnick "$pjen-kickmsg" 30
        newchanban $chan *!$ident@* $::botnick "$pjen-kickmsg" 0
        putquick "MODE $chan +bb $pjen-newhost *!$pjen-newident@*"
        putlog "\[$::botnick\] \[Pjen detected\] \[Idents: $pjen-ident $pjen-newident\] \[Host: $pjen-host\] \[Detection method: $pjen-method\] \[Added to database\]"
        set pjen(ident,db) "$pjen(ident,db) $pjen-ident $pjen-newident"
        set pjen(hosts,db) "$pjen(hosts,db) $pjen-host"
        } else {
        putlog "\[$::botnick\] \[Pjen detected\] \[Idents: $pjen-ident $pjen-newident\] \[Host: $pjen-host\] \[Detection method: $pjen-method\] \[Added to database\]"
        set pjen(ident,db) "$pjen(ident,db) $pjen-ident $pjen-newident"
        set pjen(hosts,db) "$pjen(hosts,db) $pjen-host"
      }
      return 0
    }
    if {[string is integer [string range $pjen-nick end-1 end]] && [string is alpha [string range $pjen-nick 0 3]]} {
      set pjen-method "Last 2 letters of your nick contains numbers \(integers \[0-9\]\)"
      incr $pjen(joined,$chan); channel set $chan pjenjoined $pjen(joined,$chan)
      incr $pjen(detected,$chan); channel set $chan pjendetected $pjen(detected,$chan)
      if {[botisop $chan]} {
        incr $pjen(kicked,$chan); channel set $chan pjenkicked $pjen(kicked,$chan)
        set pjen-kickmsg "Pjen infected drone. Detection method: $pjen-method ID: [channel get $chan pjenkicked]"
        putquick "KICK $chan $pjen-nick $pjen-kickmsg"
        newchanban $chan $pjen-newhost $::botnick "$pjen-kickmsg" 30
        newchanban $chan *!$ident@* $::botnick "$pjen-kickmsg" 0
        putquick "MODE $chan +bb $pjen-newhost *!$pjen-newident@*"
        putlog "\[$::botnick\] \[Pjen detected\] \[Idents: $pjen-ident $pjen-newident\] \[Host: $pjen-host\] \[Detection method: $pjen-method\] \[Added to database\]"
        set pjen(ident,db) "$pjen(ident,db) $pjen-ident $pjen-newident"
        set pjen(hosts,db) "$pjen(hosts,db) $pjen-host"
        } else {
        putlog "\[$::botnick\] \[Pjen detected\] \[Idents: $pjen-ident $pjen-newident\] \[Host: $pjen-host\] \[Detection method: $pjen-method\] \[Added to database\]"
        set pjen(ident,db) "$pjen(ident,db) $pjen-ident $pjen-newident"
        set pjen(hosts,db) "$pjen(hosts,db) $pjen-host"
      }
      return 0
    }
    if {[string is integer [string range $pjen-newident end-1 end]] || [string match "~" [string range $pjen-ident 0]]} {
      set pjen-method "Unresolved ident or ident contains numbers \(integers \[0-9\]\} in the ident"
      incr $pjen(joined,$chan); channel set $chan pjenjoined $pjen(joined,$chan)
      incr $pjen(detected,$chan); channel set $chan pjendetected $pjen(detected,$chan)
      if {[botisop $chan]} {
        incr $pjen(kicked,$chan); channel set $chan pjenkicked $pjen(kicked,$chan)
        set pjen-kickmsg "Pjen infected drone. Detection method: $pjen-method ID: [channel get $chan pjenkicked]"
        putquick "KICK $chan $pjen-nick $pjen-kickmsg"
        newchanban $chan $pjen-newhost $::botnick "$pjen-kickmsg" 30
        newchanban $chan *!$ident@* $::botnick "$pjen-kickmsg" 0
        putquick "MODE $chan +bb $pjen-newhost *!$pjen-newident@*"
        putlog "\[$::botnick\] \[Pjen detected\] \[Idents: $pjen-ident $pjen-newident\] \[Host: $pjen-host\] \[Detection method: $pjen-method\] \[Added to database\]"
        set pjen(ident,db) "$pjen(ident,db) $pjen-ident $pjen-newident"
        set pjen(hosts,db) "$pjen(hosts,db) $pjen-host"
        } else {
        putlog "\[$::botnick\] \[Pjen detected\] \[Idents: $pjen-ident $pjen-newident\] \[Host: $pjen-host\] \[Detection method: $pjen-method\] \[Added to database\]"
        set pjen(ident,db) "$pjen(ident,db) $pjen-ident $pjen-newident"
        set pjen(hosts,db) "$pjen(hosts,db) $pjen-host"
      }
      return 0
    }
    variable pjen-check "0"
  }
}

proc pjen:db:info {nick host hand arg} {
  set id [lindex [split $text] 0]
  set database(pjen) [open pjen.db r]
  set data [gets $database(pjen)]
  close $database(pjen)
  set data [split $data "\n"]
  if {![string match "$id*" $data]} {
    putserv "PRIVMSG $nick :Unique ID Number: $id does not exist in the database. Please contact a admin for futher help."
    } elseif {[string match "$id*" $data]} {
    set pjen(data) $data
    set pjen(nick) [lindex [split $pjen(data)] 2]
    set pjen(password) [lindex [split $pjen(data)] 1]
    set pjen(ident) [lindex [split $pjen(data)] 3]
    set pjen(host) [lindex [split $pjen(data)] 4]
    set pjen(reason) [ range [lindex [split $pjen(data)] 4 end]]
    putserv "PRIVMSG $nick :Info for ID: $id"
    if {[matchattr $hand nm|]} {
      putserv "PRIVMSG $nick :Password: $pjen(password)"
      } else {
      putserv "PRIVMSG $nick :Password: Admin's only!!"
    }
    putserv "PRIVMSG $nick :Nickname: $pjen(nick)
    putserv "PRIVMSG $nick :Ident: $pjen(ident)"
    putserv "PRIVMSG $nick :Host: $pjen(host)"
    putserv "PRIVMSG $nick :Reason: $pjen(reason)
  }
}

putlog "Antipjen script by Tosser^^ loaded. Beta script!!"


possible that you help me?

thx
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri Apr 14, 2006 2:19 pm    Post subject: Reply with quote

There are a few problems, contact the author for fixes.
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Apr 14, 2006 6:13 pm    Post subject: Reply with quote

thats a very very old basic pjen script i made ages ago that never worked, im currently making a new one, once its finished, ill release it publicly.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber