11-27-2020, 18:08 +0100
 Announcement
12-02-2005, 16:40 by CyBex | BANs 
English: If you are banned in #Tcl, you can ask here to remove it. If you have a special reason in your kickmsg, remove your fault and leave us here a note.

Deutsch: Wenn du in #Tcl gebannt bist, kannst du hier nachfragen ob wir ihn entfernen können. Hast du einen besonderen Grund in der Kickmsg, behebe erst das Problem und hinterlass uns hier eine Notiz..

Good Luck..

AuthorPost
elven  03-25-2006, 13:02   | [QUIZ] #1: Abgaben Jabber
security dept.
(Administrator)
Member since 03/2004
55 Posts
Abgegebene Teilnahmen bis jetzt:

CyBex

irc.swordcoast.net
elven  05-05-2006, 02:20   Jabber
security dept.
(Administrator)
Member since 03/2004
55 Posts
So, nachdem kein weiteres Interesse ueberhaupt stattfindet (und ich auch keine weitere Zeit mehr hatte) poste ich einfach mal alle vorhandenen Quellcodes .. 2. :}

irc.swordcoast.net
elven  05-05-2006, 02:20   | Cybex Jabber
security dept.
(Administrator)
Member since 03/2004
55 Posts
                                                                                                                              
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/tclsh

rename rename b
b puts p
b proc a
b list l
b set s
b incr i
b if j
b expr e
b foreach g
b fileevent f
b lappend h
b llength t
b lindex u
b lreplace w
b lsearch x

a r {s {n ""}} {
    j {![eof $s]} {
        s r [gets $s t]
        j {$s=="stdin"} {
            j {[x $::l [s d [u $t 0]]]!=-1} {
                p $d [join [lrange [split $t] 1 end]]
            } {
                g c [file ch so*] {p $c $t}
            }
        } {
            j {$r==-1} {
                s ::l [w $::l [s p [x $::l $n]] $p]
                close $s
                after 10000 o
            }
            switch -g -- $t {
                "N*AU*:* Look*hostname" {
                    p $s "NICK $n"
                    p $s "USER $n h s :$n"
                }
                "PING *" {p $s "PONG [u $t 1]"}
                "* NOT* :on *[b]" - "[/b]* KICK *" {p $s "JOIN #cybex"}
                "* MODE * +o*" - "* MODE * -o*" {
                    # protect :)
                    s c [u $t 2]
                    g {1 2 3 4 5 6} $::l {p $s "MODE $c +oooooo $1 $2 $3 $4 $5 $6"}
                }
                "* JOIN :*" {
                    s c [string range [u $t 2] 1 end]
                    g {1 2 3 4 5 6} $::l {p $s "MODE $c +oooooo $1 $2 $3 $4 $5 $6"}
                }

            }
        }
    }
}
a o {} {
    s my [l 217.160.128.86 82.165.15.22 212.227.77.221 212.227.78.57 212.227.78.58 212.227.78.59 212.227.78.60 212.227.78.70 212.227.78.76]
    s ::myip [u $my [e {int(rand()*9)}]]
    s s [socket -async -myaddr $::myip irc.swordcoast.net 6667]
    fconfigure $s -blocking false -buffering line
    f $s readable [l r $s $s]
    h ::l $s
}
j {![string is digit -str $argv]} {exit}
h ::l CyBex
h ::l thommey
f stdin readable [l r stdin]
for {s i 0} {$i<$argv} {i i} {
    after [e 500*$i] o
}
vwait 1


irc.swordcoast.net
elven  05-05-2006, 02:22   | Elven Jabber
security dept.
(Administrator)
Member since 03/2004
55 Posts
                                                                                                                              
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#!/usr/bin/ruby -l -rsocket -ripaddr
# Short multiserver IRC clone thingy
# Arguments to pass: count of clones, nickname base, vhost list (,-delimited), host, port
# All arguments are mandatory. Use 0.0.0.0 for any available vhost.
#
# You can specify a "s" in front of any vhost to designate this vhost to be a SOCKS 4 proxy
# instead. This feature requires a port: sa.b.c.d:9050
#
### The rest of the arguments (one line per argument) gets autoperformed on connect.
#
# Examples:
#  connect directly:
#   ruby irc.rb 5 nick 0.0.0.0 $ip 6668 "JOIN #test"
#  connect through socks4 proxy at 10.42.1.2:9050:
#   ruby irc.rb 5 nick s10.42.1.2:9050 $ip 6668 "JOIN #test"
#
#
# Dev notes:
# the -l argument chomps \r\n off incoming text
# This is imperative for the script to work, but saves (.strip) on gets

# This will hold all running live threads.
# One thread per drone.
$d = {}

# Global nick/thread-counter.
$x = 0

c, $n, v, *$h = *ARGV.slice!(0, 5)

$e = Regexp.escape($n)

$v = v.split /[i][,][/i]/

$n.freeze; $h.freeze; $p.freeze; $e.freeze; $v.freeze #dbg

T = true
F = false

# begin debug output
class S < TCPSocket
def p *a
puts *a
end

#       alias_method :w2, :write #dbg
#       def write(*a) #dbg
#               $stdout.puts "> #{a[0].strip.inspect}" if a[0].strip != "" #dbg
#               w2(*a) #dbg
#       end #dbg
end

# opped drones
# b = boolean: return non-ops
def o b = F
$d.values.reject {|k,v| b ? k[:o] : !k[:o] }
end

# the connect thread
def d
h = $h.dup
$v[rand $v.size] =~ /(s)?(.+?):(.+)/

# use vhost to connect if not using proxy
$1 ? (h[0, 2] = $2, $3) : h << $2

# use socks = $1 == "s"
# vhost = $2
# port = $3

#print "connecting to: "; p h
s = S.new *h

# socks4
# XXX << might have broken it
s << "\x04\x01#{[$h[1].to_i, IPAddr.new($h[0]).to_i].pack "nN"}\x0" if $1 # == "s"
# socks5
#s.p "\x05\x02\x00\x02\x05\x01\x00\x01#{[IPAddr.new($h[0]).to_i, $h[1].to_i].pack "Nn"}" if $1 == "S"

x = ($x += 1)

t = Thread.new {
    begin
    s.p "USER i * * r\nNICK " + $n + x.to_s

    while s.gets

    #puts "#{x}: #{$_}" #dbg

    a = split " "

    case $_

    # sleep on error before reconnecting
    # assuming throttle
    when /[i]^E[/i]/
    sleep 99

    # pingpong
    when /[i]^P[/i]/
    s.p "PONG " + a[1]

    # Perform on End of/MOTD missing
    when /^:\S+ (422|375)/
    s.p ARGV.join "\n"

    # Invite kicked drones.
    when /^:\S+ KICK (.+) #{$e}(\d+) /
    s.p "INVITE #{$n}#{$2} #{$1}"

    # Join when invited by a drone
    when /^:\S+ INVITE #{$e+x.to_s} :(\S+)/
    s.p "JOIN #{$1}"

    # Op incoming drones.
    when /^:#{$e}(\d+)!\S+ JOIN :(\S+)/
    s.p "MODE #{$2} +o #{$n+$1}" if $d[x]

    when /[i]^:(.+?)!\S+ MODE #[/i]/
    # $1 = the one issuing the mode
    # t = $1
    # a[2] = the channel the mode is set on
    # e = $2

    l = T
    a[3].each_byte {|c|
        l = T if ?+ == c
        l = F if ?- == c

        # c != ?o ? l = (c == ?+) :
        if c == ?o
        if (v = a.slice! 4) =~ /[i]^#{$e + x.to_s}$[/i]/
        $d[x][0][:o] = l
        if l
        # op all others
        n = o(T).collect {|i| i[2] }

        while 0 < (y = n.slice! 0, 6).size
        s.p "MODE #{a[2]} +oooooo #{$n}#{y.join " "+$n}"
        end
        else
        # deop the sucker who deopped one of our drones!
        s.p "MODE #{a[2]} -o+o #{t} "+v
        end
        end
        # optional feat: auto-unban
        # if we are opped and someone sets a ban, remove it
        #elsif l && c == ?b && $d[x][0][:o]
        #       s.p "MODE #{a[2]} -b #{a.slice! 4}"
        end
    }
    end
    end
    rescue
    #Exception => e #dbg
    #puts e.to_s #dbg
    #puts e.backtrace.join "\n" #dbg
    #exit #dbg
    end

    # can be nilled?
    $d.delete x

    d
}
$d[x] = [t, s, x]
end

# Startup all drones.
c.to_i.times { d }

# Pass all arguments to all running threads.
while $stdin.gets
$d.each {|k,v|
    v[1].p $_
}
end


992 bytes.

irc.swordcoast.net
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen | Time: 627.4 msec, CPU time: 95.6 msec, 37 Database queries in 561.3 msec | 8.1 kB (43.2 kB) | Timezone: +0100