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.

need a script to add to proxycheck.tcl

Support & discussion of released scripts, and announcements of new releases.
Post Reply
n
noobman
Voice
Posts: 29
Joined: Fri Nov 23, 2007 8:47 am

need a script to add to proxycheck.tcl

Post by noobman »

Hi to everyone:
Im using this proxycheck which i can add port to be scanned on join.

Code: Select all

################################################################################
#  
#  TCL scripts by Ofloo all rights reserved.
# 
#  HomePage: http://ofloo.net/
#  CVS: http://cvs.ofloo.net/
#  Email: support[at]ofloo.net
#  
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#   
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#   
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#  
#  ChangeLog:
#   - 11/02/2005: Fix close fd
################################################################################

namespace eval proxyban {
  
  ###################################
  # Main settings change to your
  # preference.
  ###################################

  variable banport "1080,1081,3380,3381" ;# Most commen port list
  variable bantime "20" ;# Permanent ban.
  variable bantext "Proxys Detected! If you are not a Proxy /pm noobman. 20 min Ban!" ;# Ban msg when bot kicks user
  variable warnmsg "Scanning for proxys plz ignore the warning on your firewall." ;# notify the user.
  
  ###################################
  # Do not edit below
  ###################################

  variable version "1.1"

  ###################################
  # Join bind
  ###################################

  proc scan_join {nick host hand chan} {
    variable banport; variable warnmsg
    putserv "NOTICE $nick :$warnmsg"
    set hostname [lindex [split $host \x40] end]
    foreach {x} [split $banport \x2c] {
      if {![catch {socket -async $hostname $x} s]} {
        fileevent $s writable [list [namespace current]::check_sock $s $host $chan]
      }
    }
  }

  ###################################
  # fileevent callback
  ###################################

  proc check_sock {s host chan} {
    variable bantime; variable bantext
    if {[string equal {} [fconfigure $s -error]]} {
      newchanban $chan [maskhost $host] $::botnick $bantext $bantime
    }
    close $s
  }

  bind join - * [namespace current]::scan_join
  
################################################################################
  putlog "\002ProxyCheck.tcl\002 version \002$version\002 by \002Ofloo\002 is loaded."

}
But my quiestion is that all ports i must add, i must do it by oppening the tcl and adding them , and then upload it by ftp.

Question : "Could you add a litle script to the tcl to can add port in channel ?"

I mean for example : the eggdrop is running and i want to add a port to be checked on join, then i should type in the channel : !add 25467

Then the port 25467 will be added and saved in a txt file, and the bot will check for that por when the people join.
Thanks masters!!
z
ztian299
Halfop
Posts: 59
Joined: Sat Apr 19, 2008 4:57 pm
Location: *.no

Post by ztian299 »

You could use putty, and edit your script with pico/nano/vim
http://www.chiark.greenend.org.uk/~sgta ... nload.html
Post Reply