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.

bind notc - * ...

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

bind notc - * ...

Post by Ofloo »

what's the bind for raw server notice
Description: dest will be a nickname (the bot's nickname, obviously) or a channel name. mask is matched against the entire notice and can contain wildcards. It is considered a breach of protocol to respond to a /notice on IRC, so this is intended for internal use (logging, etc.) only.Note that server notices do not trigger the NOTC bind.
just wana trigger an even when a user connects ..
XplaiN but think of me as stupid
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You should be able to catch them using the RAW bind and a key of NOTICE.

However, you should be careful and make sure you force a return code in a procedure triggered by a RAW bind.

Many people forget that TCL will use the return buffer from the last command as the return value for a procedure. In most cases, this causes the bot to ignore all input.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

so what your saying is that there is a return 0 and when 0 it doesn't show so i na way i need to reverse it ? or what exactly are you saying ?? you got some docu where i can read on this .. ? or is there an other raw i can use for this i just wana ban certain bots with my eggdrops, and perfrom an ctcp version on connect .. and gline certain individuals or certain users by doing this
XplaiN but think of me as stupid
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

There isn't much more to say that the good old RTFM.

The RAW bind is documented.

You need to force a "return 0" in allmost every aspect of a RAW bind, to prevent your bot ignoring messages.
User avatar
droolin
Halfop
Posts: 64
Joined: Thu Jul 24, 2003 9:07 pm
Contact:

I can attest to what was just said

Post by droolin »

I found, even though I read the manual. That when I did not put in my procedures a return 0 from a raw event. I had some really strange results. And I used raw notice by the way, to interpit connections to a network. For basicatly what you are doing, except I was feeding ip's to the bopm proxy scanner bots. It definatly works.

droolin
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

sorry you all lost me let me read up on this and get back to you.
XplaiN but think of me as stupid
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

droolin

could you give me a sample of that script i need to get ips of connection clients as well to ctcp version them to see if there sdbots or something like that so .. i would be great full if you could send me that script or tel me where to get it... i could see how you managed to create sutch bind on a raw server notice to create that script tnx

sorry for the late answer i axidently removed all my default linux routes and cause i didn't knew any think about it, it took me a while to get it back up and running tnx ;) for understanding hehe
XplaiN but think of me as stupid
User avatar
droolin
Halfop
Posts: 64
Joined: Thu Jul 24, 2003 9:07 pm
Contact:

ok, here goes

Post by droolin »

Please be advised, that this was my tcl script that I wrote. But, like what I think your trying to do. It was to help protect the irc network that I am a part of. What this paragraph does is interpet any notice that the eggdrop receives, looking only for connect notices(both far and local). This specific script ignores any connect notices that occur from either services or statserv, which I beleive you will want to also. Once it was determined that a connect was occuring against the network, the script then takes the string as an array and strips out the ip. Which, then I did what I needed to do. Follows is the code for the raw NOTICE bind and paragraph that I use.

Code: Select all

#
# non_scannable_servers is the names of servers that you do not want netbopm to monitor.  Examples would
#       be services due to people not identifying their nick in time.  Waste of time for netbopm to even
#       look at anything from there, and statserv due to various bots that join to collect statistics.
#
set     non_scannable_servers   {
        "Services.AwesomeChat.Net"
        "Stats.AwesomeChat.Net"   
}
#
# Variable for determining if a user has connected on the server that the eggdrop is on, or another
# server on the network.
#       
set     remote_connect          "Client connecting at"
# Check_Raw_Notices: This event is used to capture the connects of users from the various
#       servers.  Once the bind occurs, then the server is checked to determine if there is
#       an active bopm proxy bot monitoring it.  If not, then a random bopm proxy bot is
#       selected.  And a manual scan command is issued to the bopm monitor channel for the
#       ip of the connecting user to be checked.
#
bind    raw     -       Notice  Check_Raw_Notice
proc    Check_Raw_Notice        {from   word    text} {
        global  botnick
        global  bopm_channel
        global  active_bopm_bots
        global  active_bopm_servers
        global  non_scannable_servers
        global  ips_scanned 
        global  remote_connect  
        global  ban_time
        global  server
        set     string_text     [join [list $text]]
        set     string_check1   [string match *problems* $string_text]
        if      {([string match *connecting* $string_text])
        &&       (!$string_check1)} {
                if {[string match *$remote_connect* $string_text]} {
                        set enclosed_ip         [string trimleft [lrange [split $text] 9 9] *(]
                        set da_server           [split [lindex $text 7] :]
                        set connect_nick        [lindex $string_text 8]
                } else {
                        set enclosed_ip         [string trimleft [lrange [split $text] 10 10] *(]
                        set da_server           [split $server :]
                        set connect_server      [lindex $da_server 0]
                        set connect_nick        [lindex $string_text 9]
                }
                set connect_server      [lindex $da_server 0]
                set enclosed_ip [string trimright $enclosed_ip )*]
                set list_ip     [split $enclosed_ip @]
                set daip        [lindex $list_ip 1]
                puthelp "PRIVMSG $bopm_channel :$connect_nick has connected oin $connect_server"
                if {([llength $active_bopm_bots] == -1)} {
                        return 0
                } else {
                        if  {([llength $active_bopm_bots] == 0)} {
                                set danumber    0
                        } else {
                                set danumber    [rand [llength $active_bopm_bots]]
                        }
                }
                set danick              [lindex $active_bopm_bots $danumber]
                if      {(![string match *$connect_server* $active_bopm_servers])
                &&       (![string match *$connect_server* $non_scannable_servers*])} {
                        putloglev * $bopm_channel "---"
                        putloglev * $bopm_channel "$danick is scanning ip $daip on server $connect_server"
                        putloglev * $bopm_channel "---"
                        puthelp "PRIVMSG $bopm_channel :$danick scan $daip"
                        incr ips_scanned 1
                } 
        }
        return 0
}
Now, what they was saying is. If you read the documentation concerning the raw event. It very highly advise's of issuing a return code of 0. Very highly. Also, I know you probably didnt want to see all of this paragraph, but I wanted to show how I loaded the string from the notice into an array , pulled out the ip. What I think you are looking for is to extract the nick from a connect notice, so that you can do a ctcp version. With the case of Unreal, this is right before the location of the ip/host.
Errr, I hope this helps. By the way, again as I was saying. I think you are trying to do the same thing I am. Protect our network from bots. If you have any sugestions with regard to these sdbots. We get them too. So, Im all ears.

droolin
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

tnx got to go over if i got questions ill youll hear a scream ;) if you don't mind hehe
XplaiN but think of me as stupid
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

and if i finish the script ill post it here will take a while tho i know some guy who is working on a drone scanner (scans irc for ddos bots and stuff) i wana do bot drone scan and check the ones that connect on version, but some change the version of couse thats where the drone scanner comes in ;)

it all works manual but now i wana create it so that it's automatic ;) and all tcl cause part of it is mrc and ... if you know what i mean hehe but tnx for the script i am realy sur i could use some samples from it ;)
XplaiN but think of me as stupid
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

nice script man ;) nice indeed
XplaiN but think of me as stupid
S
Singe

Post by Singe »

Was wondering if you had any luck with your bot / drone scanner script? I've been working on one as well, and I think I got it but it is way way too slow to be effective..
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

kinda got to figur out some more about irc , i made eggdrop start new connection as server to irc so kinda working on that first i want to make it connect as a service not as a bot but maybe i can help .. do share if you want or people here

i mean speed it up eh ;)
XplaiN but think of me as stupid
Locked