<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/10636" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2005-10-09T21:17:43-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/10636</id>

		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-10-09T21:17:43-04:00</updated>

		<published>2005-10-09T21:17:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56494#p56494</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56494#p56494"/>
		<title type="html"><![CDATA[script causes eggdrop bug]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56494#p56494"><![CDATA[
<blockquote class="uncited"><div>Ok. I decided to modify the code which awyeah made ...</div></blockquote>Is it any wonder?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sun Oct 09, 2005 9:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-10-09T17:28:06-04:00</updated>

		<published>2005-10-09T17:28:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56489#p56489</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56489#p56489"/>
		<title type="html"><![CDATA[script causes eggdrop bug]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56489#p56489"><![CDATA[
irrelevant &amp; wrong forum<br><br>awyeah's script is obviously buggy, but no script bug should ever crash eggdrop; report to eggheads or winheads<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Oct 09, 2005 5:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-10-09T16:16:16-04:00</updated>

		<published>2005-10-09T16:16:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56484#p56484</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56484#p56484"/>
		<title type="html"><![CDATA[script causes eggdrop bug]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56484#p56484"><![CDATA[
Ok. I decided to modify the code which awyeah made, his w32aplore code, and wiebe's ircworm script. But now, when the eggdrop (its a windrop)connects to irc with this script loaded and joins #antipjen it causes a bug.<br><br>The bug:<br><div class="codebox"><p>Code: </p><pre><code>&lt;level93|Tosser&gt; .+chan #antipjen&lt;aP|Drone&gt; [20:46] tcl: builtin dcc call: *dcc:+chan Tosser 9 #antipjen&lt;aP|Drone&gt; [20:46] #Tosser# +chan #antipjen&lt;aP|Drone&gt; [20:46] Tcl error [w32aplore:virus]: no such channel record&lt;aP|Drone&gt; [20:46] * Last context: tclhash.c/684 [Tcl proc: *join:notes, param:  $_jp1 $_jp2 $_jp3 $_jp4]&lt;aP|Drone&gt; [20:46] * Please REPORT this BUG!&lt;aP|Drone&gt; [20:46] * Check doc/BUG-REPORT on how to do so.&lt;aP|Drone&gt; [20:46] * Wrote DEBUG&lt;aP|Drone&gt; [20:46] * SEGMENT VIOLATION -- CRASHING!-DCC session closed</code></pre></div>The antipjen code:<br><div class="codebox"><p>Code: </p><pre><code>#by wiebe @ QuakeNet #counters this worm http://www.vsantivirus.com/drefir-e.htmsetudef flag antipjensetudef str antipjen_scannedsetudef str antipjen_detectedsetudef str antipjen_kickedsetudef str antipjen_id bind join -|- * ircworm:joinbind join - "*" w32aplore:virus bind join -|- * check:op:joinbind pub - !antipjen pub:antipjen:togglebind msg - antipjen antipjen:toggle  proc ircworm:join { nick uhost handle chan } {if {![isbotnick $nick]} {if {[channel get $chan antipjen]} {[expr [channel get $chan "antipjen_scanned"] +1]#the nicks  set pjennicks "Zenia Zoe Zilya Xenia Xylia Xandra Willa Wendy Vicky Vivian Violet Valora Vanessa Valda Ula Uma Sharon Silver Rosa Ruby Rita Rae Rachel Queen Peggy Pamela Olivia Olga Nicole Naomi Natalie Nora Nina Nova Nadia Maia Mary Melody Mimi Myra Linda Lisa Lolita Lynn Laura Lara Kara Kassia Kyle Kali Kacey Katrina Janet Jewel Joanna Juliet Julie Ida Idona Isabel Iris Ivana Ivory Helga Holly Haley Gloria Gilda Gale Faith Emily Evelyn Eve Erika Eliza Eden Ebony Donna Dora Doris Diana Danielle Daria Damita Camille Cara Carla Carmen Clarissa Chelsea Caitlin Bettina Blenda Bridget Briana Bella Becky Barbra Aldora Alysia Amorita Aretina Ara April Anita"#check if nick ends in 2 digits and the rest of the nick is in the list  if { [regexp {\d\d$} $nick] &amp;&amp; ![string equal [lsearch -exact [split $pjennicks] [string range $nick 0 end-2]] -1] || [string match "*$pjennicks*" "[lindex [split $uhost @] 0]"] } {#increase the detected counter[expr [channel get $chan "antipjen_detected"] +1]#set mask to ban    set ban *!*@[lindex [split $uhost @] 1]#increase the antipjen id counter[expr [channel get $chan "antipjen_id"] +1]#banif {[botisop $chan]} {putquick "KICK $chan $nick :\[IrcWorm-1.3\] infected drone detected \(ID: [channel get $chan antipjen_id]\) \(Anti-pjen bot by #antipjen\)"[expr [channel get $chan "antipjen_kicked"] +1]} else {putserv "PRIVMSG $chan :#Antipjen: If im not oped within 3 minutes i will part $chan \(Anti-pjen bot by #antipjen\)"utimer 3 [check:op $chan]}newchanban $chan $ban $::botnick "\[IrcWorm-1.3\] infected drone detected \(ID: [channel get $chan antipjen_id]\) \(Anti-pjen bot by #antipjen\)" 0      }        }  }}proc check:op {chan} {if {[string equal -nocase $::botnick $nick]} {if {![botisop $chan]} {set reason "no op"putserv "PRIVMSG $chan :This channel has been deleted \(Reason: $reason\) \(Anti-pjen bot by #antipjen\)"channel remove $chanlappend suspended $chan $reasonputserv "PRIVMSG #antipjen :Channel '$chan' has be deleted from my channel list \(Reason: $reason\)"}}}proc check:op:join {nick host hand chan} {if {[string equal -nocase $::botnick $nick]} {if {![botisop $chan]} {set reason "no op"putserv "PRIVMSG $chan :This channel has been deleted \(Reason: $reason\) \(Anti-pjen bot by #antipjen\)"channel remove $chanlappend suspended $chan $reasonputserv "PRIVMSG #antipjen :Channel '$chan' has be deleted from my channel list \(Reason: $reason\)"}}}bind raw -|- "315" ircworm:rawproc ircworm:raw { server numeric text } {  set chan [string tolower [lindex [split $text] 1]]#invalid chan  if { ![validchan $chan] } { return 0 }#check if we recently joined  if { [expr [unixtime] - [getchanjoin $::botnick $chan]] &gt; "60" } { return 0 }#check each user  foreach nick [chanlist $chan] { ircworm:join $nick [getchanhost $nick] [nick2hand $nick] $chan }}proc w32aplore:virus {nick uhost hand chan} {if {[channel get $chan antipjen]} {[expr [channel get $chan "antipjen_scanned"] +1]if {![isbotnick $nick] &amp;&amp; ![isop $nick $chan] &amp;&amp; ![isvoice $nick $chan] &amp;&amp; ![string equal -nocase "#indiahelp" $chan] &amp;&amp; [regexp -nocase {^[a-z]{4,}[0-9]{2}$} $nick] &amp;&amp; [string equal "~" [string index [lindex [split $uhost @] 0] 0]] &amp;&amp; [regexp -all {^[^{}\\\[\\\]-_^`|\\\\]$} $nick] &amp;&amp; [string equal "1" [check:ip [lindex [split $uhost @] 1]]] &amp;&amp; [string match "*\[0-9\]\[0-9\]*" [string range [string trimleft [lindex [split $uhost @] 0] ~] [expr [string length [string trimleft [lindex [split $uhost @] 0] ~]]-2] end]]} { if {[string equal [string trimleft [lindex [split $uhost @] 0] ~] $nick] &amp;&amp; [string equal [string length [string trimleft [lindex [split $uhost @] 0] ~]] [string length $nick]] || [string equal "2" [string length [string trimleft [lindex [split $uhost @] 0] ~]]] &amp;&amp; [string equal [string range [string trimleft [lindex [split $uhost @] 0] ~] [expr [string length [string trimleft [lindex [split $uhost @] 0] ~]]-2] end] [string range $nick [expr [string length $nick]-2] end]]} { [expr [channel get $chan "antipjen_detected"] +1][expr [channel get $chan "antipjen_id"] +1]if {[botisop $chan]} {putquick "KICK $chan $nick :\[W32@aplore] infected drone detected \(ID: [channel get $chan antipjen_id]\) \(Anti-pjen bot by #antipjen\)"[expr [channel get $chan "antipjen_kicked"] +1]} else {putserv "PRIVMSG $chan :#Antipjen: If im not oped within 3 minutes i will part $chan \(Anti-pjen bot by #antipjen\)"utimer 3 [check:op $chan]}newchanban $chan $ban $::botnick "\[W32@aplore] infected drone detected \(ID: [channel get $chan antipjen_id]\) \(Anti-pjen bot by #antipjen\)" 0} } }} proc check:ip {str} { set tmp [split $str .] if {[llength $tmp] != 4} then { return 0 } set index 0 foreach i $tmp { if {(([regexp \[^0-9\] $i]) || ([string length $i] &gt; 3) || (($index == 3) &amp;&amp; (($i &gt; 254) || ($i &lt; 1))) || (($index &lt;= 2) &amp;&amp; (($i &gt; 255) || ($i &lt; 0))))} then { return 0 } incr index } return 1 } proc antipjen:toggle {n u h t} {  set channel [lindex [split $t] 0]  set option [lindex [split $t] 1]  switch exact $option {    "on" {      if {[matchattr $h nmA|]} {        if {![validchan $channel]} {          putserv "NOTICE $n :Channel '$channel' is not a valid channel"          } else {          if {[channel get $channel "antipjen"]} {            putserv "NOTICE $n :Anti-pjen is already enabled for $channel"            } else {            channel set $channel +antipjen            putserv "NOTICE $n :Done"          }        }      }    }    "off" {      if {[matchattr $h nm|]} {        if {![validchan $channel]} {          putserv "NOTICE $n :Channel '$channel' is not a valid channel"          } else {          if {![channel get $channel "antipjen"]} {            putserv "NOTICE $n :Anti-pjen is already disabled for $channel"            } else {            channel set $channel -antipjen            putserv "NOTICE $n :Done"          }        }      }    }    "default" {      if {[matchattr $h nm|]} {        if {![validchan $channel]} {          putserv "NOTICE $n :Channel '$channel' is not a valid channel"          } else {          if {[channel get $channel "antipjen"]} {            putserv "NOTICE $n :Anti-pjen is enabled for $channel"            } else {            putserv "NOTICE $n :Anti-pjen is disabled for $channel"          }        }      }      putserv "NOTICE $n :Please use: /msg $::botnick $::lastbind on|off"     }  }}proc pub:antipjen:toggle {n u h c t} {set option [lindex [split $t] 0]if {$option == "stats"} {putserv "NOTICE $n :Stats for $c: Scanned: [channel get $c "antipjen_scanned"] Detected: [channel get $c "antipjen_detected"] Kicked: [channel get $c "antipjen_kicked"]"} else {putserv "NOTICE $n :Please use: $::lastbind stats"}}putlog "anti-pjen.tcl loaded!!"</code></pre></div>Please help me, i dont see how this tcl script can cause such a bug.<br><br>Thanks in advance !!! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sun Oct 09, 2005 4:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
