Code: Select all
foreach {key value} [array get buf_base64] {
append output $value
}
Code: Select all
foreach {key} [lsort -integer [array names buf_base64]] {
append output $buf_base64($key)
}
Code: Select all
set base64to [list \
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 0 52 53 54 55 56 57 58 59 60 61 0 0 \
0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 \
15 16 17 18 19 20 21 22 23 24 25 62 0 63 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
set tobase64 [list \
A B C D E F G H I J K L M \
N O P Q R S T U V W X Y Z \
a b c d e f g h i j k l m \
n o p q r s t u v w x y z \
0 1 2 3 4 5 6 7 8 9 \[ \]]
proc base64_to_int {str} {
set x 0
for {set i 0} {$i < [string length $str]} {incr i} {
set x [expr $x << 6]
set x [expr $x + [lindex $::base64to [scan [string index $str $i] "%c"]]]
}
return $x
}
proc int_to_base64 {val} {
set i 11
if {!$val} {
return [lindex $::tobase64 0]
}
while {$val} {
incr i -1
set buf_base64($i) [lindex $::tobase64 [expr $val & 0x3f]]
set val [expr $val >> 6]
}
foreach {key} [lsort -integer [array names buf_base64]] {
append output $buf_base64($key)
}
return $output
}
Code: Select all
% set base64 [int_to_base64 1061103]
EDDv
% puts [base64_to_int $base64]
1061103
Code: Select all
alias F2 {
sockopen egg123 $$?="Host" $$?="port"
}
alias cF2 {
aline 8 @ $+ %eggsocktempsock Added user
#sockwrite -n %eggsocktempsock j services loging A *A looking@what.you.are.doing.log
#sockwrite -n %eggsocktempsock j services security A *B bouncer@the.door.wants.to.knock.you.out
#sockwrite -n %eggsocktempsock j services linkbrige A *C bridge@link.abc.def.=blowfish.+Ji7d0dvs7bh9j34s5ffn
#sockwrite -n %eggsocktempsock j services talkbrige A *D bridge@link.def.abc.=blowfish.+gdh6d7ghdfs0ddd3fnj9
sockwrite -n %eggsocktempsock n logging services !D8Ji
sockwrite -n %eggsocktempsock n chatserv services !D8Ji
sockwrite -n %eggsocktempsock j chatserv chatuser A @Z chat@services.chat.space.1
}
alias cF3 {
sockwrite -n %eggsocktempsock n testing services ! $+ $$?="h"
}
alias sF2 {
set %eggtempd $$?="data"
sockwrite -n %eggsocktempsock %eggtempd
aline 6 @ $+ %eggsocktempsock %eggtempd
unset %eggtempd
}
alias eggdropinput {
return 0
}
on 1:input:@egg*:{
if ($left($1,1) == .) {
if ($eggdropinput($left($1-,-1)) == 1) {
halt
}
}
aline 6 @ $+ %eggsocktempsock CHAT: $1-
sockwrite -n %eggsocktempsock c chatuser@chatserv A $1-
}
on 1:sockopen:egg*:{
window -e @ $+ $sockname
aline 4 @ $+ $sockname Opened eggdrop socket $sockname
set %eggsocktempsock $sockname
sockmark $sockname debug
}
on 1:sockread:egg*:{
sockread %eggsocktemp
var %in 1
while ($sockbr != 0) {
if (%in > 1) {
sockread %eggsocktemp
}
if (%eggsocktemp == $null) return
if ($right(%eggsocktemp,9) == nickname.) {
sockwrite -n $sockname services
aline 5 @ $+ $sockname : Sending handle: Services
}
set %thiseggsock $sockname
if ($sock($sockname).mark == debug) {
aline -p @ $+ $sockname $sockname $+ : %eggsocktemp
}
if ($eggdropcommand($sockname, %eggsocktemp) != $null) {
aline -p 5 @ $+ $sockname : $ifmatch
}
inc %in
}
}
on 1:sockclose:egg*:{
aline 4 @ $+ $sockname Eggdrop closed the connection $sockname
}
alias eggver {
if ($1 == 1.0.0.0) { return D0JA }
}
alias eggdropcommand {
tokenize 32 $2-
if ($1 == tb) {
sockwrite -n $sockname tb services
sockwrite -n $sockname n chatserv services - $+ $eggver(1.0.0.0)
sockwrite -n $sockname j chatserv chatuser A @J chatuser@chatserv.services.egg.net
sockwrite -n $sockname i chatserv J S9
return Connected to $2
}
if ($1 == *bye) {
return Disconnection from botnet
}
if ($1 == version) {
sockwrite -n $sockname version 2000199 9 ServDrop v2.0.1 beta <Services agent>
}
if ($1 == passreq) {
sockwrite -n $sockname aabbccdd
return Password sent
}
if ($1 == *hello!) {
sockwrite -n $sockname *hello!
}
if ($1 == pi) {
sockwrite -n $sockname po
return Ping, Pong
}
if ($1 == c) {
return 8< $+ $2 $+ > $4-
}
if ($1 == el) {
sockwrite -n $sockname el
}
if ($1 == pt) {
return *** ( $+ $2 $+ ) $3 has left the partyline ( $+ $5- $+ )
}
if ($1 == po) {
return Pong, Ping :P
}
return $null
}
Code: Select all
passreq <72303e8f308a@Lamestb2t>
Code: Select all
el
Code: Select all
idle Lamestb2t 8 71