#####################################################
### CONFIGURATION ###
#####################################################
# Enable reports by mail (0/1)
set bs_reports_email 0
# Enable HTML reports (0/1)
set bs_report_html 1
# (If you set both variables to 0, why are you using this script ?!?)
# Tell botnet users that I am generating web pages on the botnet
set bs_announce_html 1
# Name of the botnet (if no, leave empty)
set bsbotnetname "my botnet bitch"
# Language of the output (english = 0 ; french = 1)
set bslang 0
#####################################################
### EMAIL REPORTS CONFIGURATION ###
#####################################################
# To send a mail : .sendreport
#/!\ This script uses sendmail to send the mail. If you don't have it,
# the script will not work.
# Path to sendmail
set bssendmailpath "/usr/sbin/sendmail"
# email address of those who will receive the stats
set bsaddressto "mail"
# email address the bot uses to send the mails
set bsaddressfrom "mail"
if $bs_reports_email {
# When to send the mail (look at the bind time syntax)
# this sends the mail at midnight every day (or night :p)
bind time - "00 00 * * *" bstime:sendmail
}
# Number of bots per line in the mail
set bsbotsperline 7
#####################################################
### HTML REPORTS CONFIGURATION ###
#####################################################
# Where to create to web page :
set bsstatslocation "patch
if $bs_report_html {
# When to update the web page (look at the bind time syntax)
# This update the web page every 10 minutes
bind time - "10 * * * *" bsmakehtml
bind time - "20 * * * *" bsmakehtml
bind time - "30 * * * *" bsmakehtml
bind time - "40 * * * *" bsmakehtml
bind time - "50 * * * *" bsmakehtml
bind time - "00 * * * *" bsmakehtml
}
##### HTML #####
## body's color
set bshtmlcolor(bodybg) #FFFFFF
## Text's color
set bshtmlcolor(bodytxt) #000000
## links' color
set bshtmlcolor(bodylink) #0000FF
## Visited links' color
set bshtmlcolor(bodyvlink) #FF0000
## Active link's color
set bshtmlcolor(bodyalink) #33CC33
## Borders' width
# Ex : set border 1
set bshtmlcolor(border) 1
## Light borders' color
set bshtmlcolor(bordercolorlight) #FFFFFF
## Dark borders' color
set bshtmlcolor(bordercolordark) #FFFFFF
## Background of the first lines of tables
set bshtmlcolor(borderbg) #9999FF
## Color of border
set bshtmlcolor(bordercolor) #FFFFFF
## Background of the other lines of tables
set bshtmlcolor(lborderbg) #FFFFFF
#####################################################
### BOTNET ANNOUNCEMENT CONFIGURATION ###
#####################################################
# URL where the stats are located
set bsstatsurl "urll"
if $bs_announce_html&&$bs_report_html {
# When to announce on the botnet (look at the bind time syntax)
# this sends the mail at 20pm every evening
bind time - "00 19 * * *" bstime:botnetell
}
#####################################################
### PLEASE DO NOT MODIFY ANYTHING BELOW THIS LINE ###
#####################################################
# Version du script
set bsver 1.2
#
## INTERNAL FUNCTIONS
#
proc bst { index } {
global bstextes bslang
if [info exists bstextes(l${bslang}i${index})] {
return $bstextes(l${bslang}i${index})
} else {
putlog "BotnetStats Updating ..."
}
}
proc bsgetversion { bot } {
set blist [botlist]
set index [lsearch [string tolower $blist] [string tolower [list $bot *]]]
if $index!=-1 {
return [lindex [lindex $blist $index] 2]
} else {
return -1
}
}
proc bsremovezero { number } {
if ![string compare [string index $number 0] "0"] {
return [string index $number 1]
} else {
return $number
}
}
proc bsgettextbranch { numbranch } {
if $numbranch==1031 {
return [bst 2]
} elseif $numbranch==1032 {
return [bst 3]
} else {
if [string length $numbranch]==3 {
return "eggdrop [string index $numbranch 0].[bsremovezero [string range $numbranch 1 2]]"
} else {
return "[bst 4] $numbranch"
}
}
}
proc bsgettextversion { numversion } {
if [string length $numversion]==5 {
return "eggdrop [string index $numversion 0].[bsremovezero [string range $numversion 1 2]].[bsremovezero [string range $numversion 3 4]]"
} else {
return "[bst 5] $numversion"
}
}
proc bssearchbot { bot } {
global bsseenbots
return [lsearch -exact [string tolower $bsseenbots] [string tolower $bot]]
}
proc bsspaces { number } {
set spc ""
while {[string length $spc]<$number} {
set spc "$spc "
}
return $spc
}
proc bsdispbotlist { sendmail liste } {
global bsbotsperline
set liste [lsort -dictionary $liste]
set listlength [llength $liste]
for {
set i 0
set output ""
set nbbotsline 0
} { $i<$listlength } {
incr i
} {
incr nbbotsline
set output "$output [lindex [lindex $liste $i] 0][bsspaces [expr 9 - [string length [lindex [lindex $liste $i] 0]]]]"
if $nbbotsline==$bsbotsperline {
puts $sendmail $output
set nbbotsline 0
set output ""
}
}
if [llength $output] {
puts $sendmail $output
}
}
proc bsdispbotlisthtml { file liste } {
global bshtmlcolor
set liste [lsort -dictionary $liste]
set listlength [llength $liste]
for {
set i 0
set output "<tr bgcolor=$bshtmlcolor(lborderbg)>"
set nbbotsline 0
} { $i<$listlength } {
incr i
} {
incr nbbotsline
set output "$output <td width=100>[lindex [lindex $liste $i] 0]</td>"
if $nbbotsline==6 {
puts $file "$output </TR>"
set nbbotsline 0
set output "<tr bgcolor=$bshtmlcolor(lborderbg)>"
}
}
if $nbbotsline {
puts $file "$output <td colspan=[expr 6-$nbbotsline]> </TD></tr>"
}
}
#
## FONCTIONS D'INTERACTION AVEC EVENEMENTS SUR LE BOTNET
#
bind link - * bsbotnet:link
proc bsbotnet:link { bot hubbot } {
global bsseenbots bshub bslinks bsislinked bsnbbots bsmaxnbbots bsmaxnbbotstime bsbotversion bsabsmaxnbbots bsabsmaxnbbotstime
if [bssearchbot $bot]==-1 {
lappend bsseenbots $bot
}
set bshub([string tolower $bot]) $hubbot
if [info exists bslinks([string tolower $bot])] {
incr bslinks([string tolower $bot])
} else {
set bslinks([string tolower $bot]) 1
}
set bsislinked([string tolower $bot]) 1
set bsbotversion([string tolower $bot]) [bsgetversion $bot]
incr bsnbbots
if $bsnbbots>$bsmaxnbbots {
set bsmaxnbbots $bsnbbots
set bsmaxnbbotstime [unixtime]
if $bsmaxnbbots>$bsabsmaxnbbots {
set bsabsmaxnbbots $bsmaxnbbots
set bsabsmaxnbbotstime [unixtime]
}
}
}
bind disc - * bsbotnet:delnk
proc bsbotnet:delnk { bot } {
global bsseenbots bshub bslinks bsislinked bsnbbots
if [bssearchbot $bot]==-1 {
lappend bsseenbots $bot
set bshub([string tolower $bot]) "unknown!"
putlog "WARNING ! $bot just delinked, but wasn't linked !"
}
if [info exists bslinks([string tolower $bot])] {
incr bslinks([string tolower $bot])
} else {
set bslinks([string tolower $bot]) 1
}
set bsislinked([string tolower $bot]) 0
incr bsnbbots -1
}
#
## FONCTIONS DE SORTIE DES RAPPORTS
#
proc bstime:botnetell {min hour day month year} {
global bsstatsurl
dccbroadcast "[bst 40] $bsstatsurl !"
}
proc bstime:sendmail { min hour day month year } {
bssendmail
}
bind dcc n sendreport bsdcc:sendreport
proc bsdcc:sendreport { handle idx arguments } {
bssendmail
return 1
}
proc bssendmail { } {
global bsseenbots bsnbbots bsmaxnbbots bsmaxnbbotstime bshub bsislinked bsbotversion bslinks bsabsmaxnbbots bsabsmaxnbbotstime bsbotnetname
global bssendmailpath bsaddressto bsaddressfrom bsver bs_reports_email
if !$bs_reports_email { return 0 }
set linkedbots ""
set unlinkedbots ""
set toplink ""
set hubs ""
set exactvers ""
set branchvers ""
foreach bot $bsseenbots {
if $bsislinked([string tolower $bot]) {
lappend linkedbots $bot
} else {
lappend unlinkedbots $bot
}
lappend toplink [list $bslinks([string tolower $bot]) $bot]
set sresult [lsearch $hubs [list * $bshub([string tolower $bot])]]
if $sresult!=-1 {
set hubs [lreplace $hubs $sresult $sresult [list [expr [lindex [lindex $hubs $sresult] 0] + 1] $bshub([string tolower $bot])]]
} else {
lappend hubs [list 1 $bshub([string tolower $bot])]
}
set exactver [string range $bsbotversion([string tolower $bot]) 0 4]
set branchver [string range $bsbotversion([string tolower $bot]) 0 2]
if $branchver==103 {
if $exactver<10324 {
set branchver 1031
} else {
set branchver 1032
}
}
set sresult [lsearch $exactvers [list * $exactver]]
if $sresult!=-1 {
set exactvers [lreplace $exactvers $sresult $sresult [list [expr [lindex [lindex $exactvers $sresult] 0] + 1] $exactver]]
} else {
lappend exactvers [list 1 $exactver]
}
set sresult [lsearch $branchvers [list * $branchver]]
if $sresult!=-1 {
set branchvers [lreplace $branchvers $sresult $sresult [list [expr [lindex [lindex $branchvers $sresult] 0] + 1] $branchver]]
} else {
lappend branchvers [list 1 $branchver]
}
}
set toplink [lsort -index 0 -decreasing -integer $toplink]
set hubs [lsort -index 0 -decreasing -integer $hubs]
set exactvers [lsort -index 0 -decreasing -integer $exactvers]
set branchvers [lsort -index 1 $branchvers]
set sendmail [open "|$bssendmailpath -t" w]
puts $sendmail "To: $bsaddressto"
puts $sendmail "From: $bsaddressfrom"
if [string length $bsbotnetname] {
puts $sendmail "Subject: [bst 6] : $bsbotnetname"
} else {
puts $sendmail "Subject: [bst 6]"
}
puts $sendmail ""
puts $sendmail " --- B o t n e t S t a t s ---"
if [string length $bsbotnetname] {
puts $sendmail ""
puts $sendmail "[bst 7] $bsbotnetname"
}
puts $sendmail ""
puts $sendmail "1. [bst 8]"
puts $sendmail "[bst 9] : $bsabsmaxnbbots ([ctime $bsabsmaxnbbotstime])"
puts $sendmail "[bst 10] : $bsmaxnbbots ([ctime $bsmaxnbbotstime])"
puts $sendmail "[bst 11] : $bsnbbots"
puts $sendmail ""
puts $sendmail "2. [bst 12]"
if [llength $linkedbots]==0 {
puts $sendmail [bst 14]
} elseif [llength $linkedbots]==1 {
puts $sendmail "[bst 13] :"
bsdispbotlist $sendmail $linkedbots
} else {
puts $sendmail "[bst 17] :"
bsdispbotlist $sendmail $linkedbots
}
puts $sendmail ""
if [llength $unlinkedbots]==0 {
puts $sendmail [bst 15]
} elseif [llength $unlinkedbots]==1 {
puts $sendmail "[bst 16] :"
bsdispbotlist $sendmail $unlinkedbots
} else {
puts $sendmail "[bst 18] :"
bsdispbotlist $sendmail $unlinkedbots
}
puts $sendmail ""
puts $sendmail "3. [bst 19]"
puts $sendmail [bst 20]
for { set i 0 } { $i<10&&$i<[llength $toplink] } { incr i } {
puts $sendmail "[expr $i + 1]. [lindex [lindex $toplink $i] 1] - [lindex [lindex $toplink $i] 0]"
}
puts $sendmail ""
puts $sendmail "4. [bst 21]"
puts $sendmail [bst 22]
for { set i 0 } { $i<10&&$i<[llength $hubs] } { incr i } {
puts $sendmail "[expr $i + 1]. [lindex [lindex $hubs $i] 1] - [lindex [lindex $hubs $i] 0]"
}
puts $sendmail ""
puts $sendmail "5. [bst 23]"
puts $sendmail "5.1. [bst 24]"
foreach element $branchvers {
if [lindex $element 0]==1 {
puts $sendmail "[lindex $element 0] [bst 26] [bsgettextbranch [lindex $element 1]]"
} else {
puts $sendmail "[lindex $element 0] [bst 27] [bsgettextbranch [lindex $element 1]]"
}
}
puts $sendmail ""
puts $sendmail "5.2. [bst 25]"
foreach element $exactvers {
if [lindex $element 0]==1 {
puts $sendmail "[bsgettextversion [lindex $element 1]] : [lindex $element 0] bot"
} else {
puts $sendmail "[bsgettextversion [lindex $element 1]] : [lindex $element 0] bots"
}
}
puts $sendmail ""
puts $sendmail [bst 28]
puts $sendmail "."
close $sendmail
# RAZ Variables
bsrazvars
}
proc bsmakehtml {min hour day month year} {
global bsseenbots bsnbbots bsmaxnbbots bsmaxnbbotstime bshub bsislinked bsbotversion bslinks bsabsmaxnbbots bsabsmaxnbbotstime bsbotnetname
global bsstatslocation bshtmlcolor bsver bs_report_html bs_reports_email
if !$bs_report_html { return 0 }
set linkedbots ""
set unlinkedbots ""
set toplink ""
set hubs ""
set exactvers ""
set branchvers ""
foreach bot $bsseenbots {
if $bsislinked([string tolower $bot]) {
lappend linkedbots $bot
} else {
lappend unlinkedbots $bot
}
lappend toplink [list $bslinks([string tolower $bot]) $bot]
set sresult [lsearch $hubs [list * $bshub([string tolower $bot])]]
if $sresult!=-1 {
set hubs [lreplace $hubs $sresult $sresult [list [expr [lindex [lindex $hubs $sresult] 0] + 1] $bshub([string tolower $bot])]]
} else {
lappend hubs [list 1 $bshub([string tolower $bot])]
}
set exactver [string range $bsbotversion([string tolower $bot]) 0 4]
set branchver [string range $bsbotversion([string tolower $bot]) 0 2]
if $branchver==103 {
if $exactver<10324 {
set branchver 1031
} else {
set branchver 1032
}
}
set sresult [lsearch $exactvers [list * $exactver]]
if $sresult!=-1 {
set exactvers [lreplace $exactvers $sresult $sresult [list [expr [lindex [lindex $exactvers $sresult] 0] + 1] $exactver]]
} else {
lappend exactvers [list 1 $exactver]
}
set sresult [lsearch $branchvers [list * $branchver]]
if $sresult!=-1 {
set branchvers [lreplace $branchvers $sresult $sresult [list [expr [lindex [lindex $branchvers $sresult] 0] + 1] $branchver]]
} else {
lappend branchvers [list 1 $branchver]
}
}
set toplink [lsort -index 0 -decreasing -integer $toplink]
set hubs [lsort -index 0 -decreasing -integer $hubs]
set exactvers [lsort -index 1 -increasing -integer $exactvers]
set branchvers [lsort -index 1 $branchvers]
set file [open "$bsstatslocation" w]
puts $file [bst 29]
puts $file "<html>"
puts $file "<head>"
puts $file "<title>...::: UniBG BoTnEt StAtS</title>"
puts $file "<STYLE TYPE=\"text/css\">"
puts $file "BODY { font-family : Verdana;"
puts $file " font-size : xx-small}"
puts $file "H1 { font-family : Verdana;"
puts $file "font-size : x-small;"
puts $file "text-align : center}"
puts $file "TD { font-family : Verdana;"
puts $file "font-size : xx-small;"
puts $file "text-align : center}"
puts $file "</STYLE>"
puts $file "</head>"
puts $file "<body>"
puts $file "<div align=center>"
if [string length $bsbotnetname] {
puts $file "<H1>[bst 7] $bsbotnetname</H1>"
}
puts $file "<H1>1. [bst 8]</H1>"
puts $file "<table width=500 border=$bshtmlcolor(border) bordercolorlight=$bshtmlcolor(bordercolorlight) bordercolordark=$bshtmlcolor(bordercolordark)
bgcolor=$bshtmlcolor(borderbg) bordercolor=$bshtmlcolor(bordercolor)>"
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)>"
puts $file "<td width=280>[bst 9]</td>"
puts $file "<td width=50>$bsabsmaxnbbots</td>"
puts $file "<td width=170>([ctime $bsmaxnbbotstime])</td>"
puts $file "</tr>"
if $bs_reports_email {
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)>"
puts $file "<td width=280>[bst 10]</td>"
puts $file "<td width=50>$bsmaxnbbots</td>"
puts $file "<td width=170>([ctime $bsmaxnbbotstime])</td>"
puts $file "</tr>"
}
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)>"
puts $file "<td width=280>[bst 11]</td>"
puts $file "<td width=50>$bsnbbots</td>"
puts $file "<td width=170>([ctime [unixtime]])</td>"
puts $file "</tr>"
puts $file "</table>"
puts $file "<H1>2. [bst 12]</H1>"
puts $file "<table cols=6 width=600 border=$bshtmlcolor(border) bordercolorlight=$bshtmlcolor(bordercolorlight)
bordercolordark=$bshtmlcolor(bordercolordark) bgcolor=$bshtmlcolor(borderbg) bordercolor=$bshtmlcolor(bordercolor)>"
puts $file "<tr bgcolor=$bshtmlcolor(borderbg)>"
puts $file "<td colspan=6>[bst 17]</td>"
puts $file "</tr>"
if [llength $linkedbots]==0 {
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)><td colspan=6>[bst 14]</td></tr>"
} else {
bsdispbotlisthtml $file $linkedbots
}
puts $file "<tr bgcolor=$bshtmlcolor(borderbg)>"
puts $file "<td colspan=6>[bst 18]</td>"
puts $file "</tr>"
if [llength $unlinkedbots]==0 {
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)><td colspan=6>[bst 15]</td></tr>"
} else {
bsdispbotlisthtml $file $unlinkedbots
}
puts $file " </table>"
puts $file "<H1>3. [bst 19]</H1>"
puts $file "<table cols=3 width=180 border=$bshtmlcolor(border) bordercolorlight=$bshtmlcolor(bordercolorlight)
bordercolordark=$bshtmlcolor(bordercolordark) bgcolor=$bshtmlcolor(borderbg) bordercolor=$bshtmlcolor(bordercolor)>"
puts $file "<tr><td width=25>[bst 30]</td><td width=75>[bst 31]</td><td width=30>[bst 32]</td></tr>"
for { set i 0 } { $i<10&&$i<[llength $toplink] } { incr i } {
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)><td width=25>[expr $i + 1].</TD><TD width=75>[lindex [lindex $toplink $i] 1]</TD><TD width=30>[lindex
[lindex $toplink $i] 0]</TD></TR>"
}
puts $file "</table>"
puts $file "<H1>4. [bst 21]</H1>"
puts $file "<table cols=3 width=180 border=$bshtmlcolor(border) bordercolorlight=$bshtmlcolor(bordercolorlight)
bordercolordark=$bshtmlcolor(bordercolordark) bgcolor=$bshtmlcolor(borderbg) bordercolor=$bshtmlcolor(bordercolor)>"
puts $file "<tr><td width=25>[bst 30]</td><td width=75>[bst 33]</td><td width=30>[bst 34]</td></tr>"
for { set i 0 } { $i<10&&$i<[llength $hubs] } { incr i } {
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)><td width=25>[expr $i + 1].</TD><TD width=75>[lindex [lindex $hubs $i] 1]</TD><TD width=30>[lindex
[lindex $hubs $i] 0]</TD></TR>"
}
puts $file "</table>"
puts $file "<H1>5. [bst 23]</H1>"
puts $file "<H1>5.1. [bst 24]</H1>"
puts $file "<table cols=3 width=600 border=$bshtmlcolor(border) bordercolorlight=$bshtmlcolor(bordercolorlight)
bordercolordark=$bshtmlcolor(bordercolordark) bgcolor=$bshtmlcolor(borderbg) bordercolor=$bshtmlcolor(bordercolor)>"
puts $file "<tr><td width=300>[bst 35]</td><td width=275>[bst 36]</td><td width=25>[bst 34]</td></tr>"
set maxbranchvers 0
foreach element $branchvers {
if $maxbranchvers<[lindex $element 0] { set maxbranchvers [lindex $element 0] }
}
foreach element $branchvers {
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)><td width=300><div align=left>[bsgettextbranch [lindex $element 1]]</div></TD><td width=275><DIV
align=left><img src=\"barre.gif\" height=10 width=[expr [lindex $element 0]*275/$maxbranchvers]</div></TD><td width=25>[lindex $element 0]</td></tr>"
}
puts $file "</table>"
puts $file "<H1>5.2. [bst 25]</H1>"
puts $file "<table cols=3 width=600 border=$bshtmlcolor(border) bordercolorlight=$bshtmlcolor(bordercolorlight)
bordercolordark=$bshtmlcolor(bordercolordark) bgcolor=$bshtmlcolor(borderbg) bordercolor=$bshtmlcolor(bordercolor)>"
puts $file "<tr><td width=130>[bst 37]</td><td width=445>[bst 36]</td><td width=25>[bst 34]</td></tr>"
set maxexactvers 0
foreach element $exactvers {
if $maxexactvers<[lindex $element 0] { set maxexactvers [lindex $element 0] }
}
foreach element $exactvers {
if [string length [lindex $element 1]]==5 {
if [info exists maxversbranch([string range [lindex $element 1] 0 2 ])] {
if [lindex $element 1]>$maxversbranch([string range [lindex $element 1] 0 2 ]) {
set maxversbranch([string range [lindex $element 1] 0 2 ]) [lindex $element 1]
}
} else {
set maxversbranch([string range [lindex $element 1] 0 2 ]) [lindex $element 1]
}
}
}
set toggle 0
foreach element $exactvers {
if [string length [lindex $element 1]]==5 {
if [info exists maxversbranch([string range [lindex $element 1] 0 2 ])] {
if [lindex $element 1]==$maxversbranch([string range [lindex $element 1] 0 2 ]) {
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)><td width=130><div align=left><FONT COLOR=\"red\">[bsgettextversion [lindex $element
1]]</FONT></div></TD><td width=445><DIV align=left><img src=\"barre.gif\" height=10 width=[expr [lindex $element 0]*445/$maxexactvers]</div></TD><td
width=25>[lindex $element 0]</td></tr>"
set toggle 1
}
}
}
if !$toggle {
puts $file "<tr bgcolor=$bshtmlcolor(lborderbg)><td width=130><div align=left>[bsgettextversion [lindex $element 1]]</div></TD><td width=445><DIV
align=left><img src=\"barre.gif\" height=10 width=[expr [lindex $element 0]*445/$maxexactvers]</div></TD><td width=25>[lindex $element 0]</td></tr>"
}
set toggle 0
}
puts $file "<TR><TD colspan=3 align=center>[bst 41]</TD></TR>"
puts $file "</table>"
puts $file "<br><br>"
puts $file "<table cols=3 width=650 border=$bshtmlcolor(border) bordercolorlight=$bshtmlcolor(bordercolorlight)
bordercolordark=$bshtmlcolor(bordercolordark) bgcolor=$bshtmlcolor(borderbg) bordercolor=$bshtmlcolor(bordercolor)>"
puts $file "<div align=center><H1>6. PartyLine ([llength [whom 0]] users)</H1></div>"
puts $file "<tr align=Center bgcolor=$bshtmlcolor(borderbg)><td><font color=$bshtmlcolor(bodytxt)>Handle</font></td><td><font
color=$bshtmlcolor(bodytxt)>Status</font></td><td><font color=$bshtmlcolor(bodytxt)>Address</font></tr></tr>"
puts $file "<br>"
set alist [whom 0]
foreach i $alist {
set nicq [lindex $i 0]
set bot [lindex $i 1]
set addr [lindex $i 2]
set stat [lindex $i 3]
if {$stat == "*"} {set stat Owner}
if {$stat == "+"} {set stat Master}
if {$stat == "@"} {set stat Op}
if {$stat == "%"} {set stat "Botnet Master"}
if {$stat == "-"} {set stat ""}
set getdccidle [lindex $i 4]
if !$getdccidle {
set getdccidle "Idle *"
} {
set getdccidle "Idle $getdccidle min"
}
if {$getdccidle != "" && $stat != ""} {
set blah ", "
} {
set blah ""
}
set away [lindex $i 5]
if {$away != ""} {
puts $file "<tr bgcolor=$bshtmlcolor(bordercolorlight)><td rowspan=2>$nicq<font
color=\"red\">@</font>$bot</td><td>$getdccidle$blah$stat</td><td>$addr</td></tr>"
puts $file "<tr bgcolor=$bshtmlcolor(bordercolorlight)><td colspan=2><i><font color=\"red\">Away:</font>$away</i></td></tr>"
} {
puts $file "<tr bgcolor=$bshtmlcolor(bordercolorlight)><td>$nicq<font
color=\"red\">@</font>$bot</td><td>$getdccidle$blah$stat</td><td>$addr</td></tr>"
}
}
puts $file "</table>"
puts $file "<br><br>"
puts $file "\n<center>This page updates every 10 minutes.<br>"
puts $file "</div>"
puts $file "</body>"
puts $file "</html>"
close $file
}
#
## FONCTION DE RAZ DES VARS
#
proc bsrazvars { } {
global bsseenbots bsnbbots bsmaxnbbots bsmaxnbbotstime bshub bsislinked bsbotversion bslinks
set bsseenbots [bots]
set bsnbbots [llength $bsseenbots]
set bsmaxnbbots $bsnbbots
set bsmaxnbbotstime [unixtime]
foreach element [botlist] {
set bshub([string tolower [lindex $element 0]]) [lindex $element 1]
set bsislinked([string tolower [lindex $element 0]]) 1
set bsbotversion([string tolower [lindex $element 0]]) [lindex $element 2]
set bslinks([string tolower [lindex $element 0]]) 0
}
}
#
## INITIALISATION DU SCRIPT
#
if !([info exists bsseenbots]&&[info exists bnbbots]&&[info exists bsmaxnbbots]&&[info exists bsabsmaxnbbots]) {
bsrazvars
set bsabsmaxnbbots $bsmaxnbbots
set bsabsmaxnbbotstime [unixtime]
}
#
## DONNEES DE LANGUES
#
set bstextes(l0i1) "BotnetStats Loaded"
set bstextes(l0i2) "eggdrop 1.3 - Original Dev Team (1.3.0 - 1.3.23)"
set bstextes(l0i3) "eggdrop 1.3 - New Dev Team (1.3.24 and higher)"
set bstextes(l0i4) "an unknown branch :"
set bstextes(l0i5) "a bogus eggdrop :"
set bstextes(l0i6) "Botnetstats.tcl output"
set bstextes(l0i7) "Statistics for"
set bstextes(l0i8) "Number of bots"
set bstextes(l0i9) "Absolute Maximum number of bots"
set bstextes(l0i10) "Maximum number of bots since last report"
set bstextes(l0i11) "Current number of bots"
set bstextes(l0i12) "Linked & Unlinked bots"
set bstextes(l0i13) "Linked bot"
set bstextes(l0i17) "Linked bots"
set bstextes(l0i14) "No linked bots"
set bstextes(l0i15) "No unlinked bots"
set bstextes(l0i16) "Unlinked bot"
set bstextes(l0i18) "Unlinked bots"
set bstextes(l0i19) "Most unstable bots"
set bstextes(l0i20) "ranking / bot / number of links/delinks"
set bstextes(l0i21) "Biggest Hub"
set bstextes(l0i22) "ranking / bot / number of leaves"
set bstextes(l0i23) "Eggdrop's versions usage"
set bstextes(l0i24) "Branches usage"
set bstextes(l0i25) "Version usage"
set bstextes(l0i26) "bot uses"
set bstextes(l0i27) "bots use"
set bstextes(l0i28) "@"
set bstextes(l0i29) "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"
set bstextes(l0i30) "Rank"
set bstextes(l0i31) "Bot's Nick"
set bstextes(l0i32) "Splits"
set bstextes(l0i33) "Hub's Nick"
set bstextes(l0i34) "Bots"
set bstextes(l0i35) "Branch"
set bstextes(l0i36) "Graph"
set bstextes(l0i37) "Version"
set bstextes(l0i38) "Last Update"
set bstextes(l0i39) "<H1><A HREF=\"mailto:
Ivailo@darksoft.cc\">
Ivailo@darksoft.cc</A></H1>"
set bstextes(l1i40) "Hello ! I generate stats about that botnet. Glance at"
set bstextes(l1i41) "<font color=\"red\">red : </FONT>Last version of each branch"
set bstextes(l1i1) "Chargé : BotnetStats.tcl v.$bsver par Lucas & NESS <
eggy@eggdrop-fr.org>"
set bstextes(l1i2) "eggdrop 1.3 - Equipe Originale (1.3.0 - 1.3.23)"
set bstextes(l1i3) "eggdrop 1.3 - Nouvelle Equipe (1.3.24 et suivants)"
set bstextes(l1i4) "une branche inconnue :"
set bstextes(l1i5) "un eggdrop bogué :"
set bstextes(l1i6) "rapport de Botnetstats.tcl"
set bstextes(l1i7) "Statistiques pour"
set bstextes(l1i8) "Nombre de bots"
set bstextes(l1i9) "Nombre maximum absolu de bots"
set bstextes(l1i10) "Nombre maximum de bots depuis le dernier rapport"
set bstextes(l1i11) "Nombre actuel de bots"
set bstextes(l1i12) "Bots linkés et délinkés"
set bstextes(l1i13) "Bot linké"
set bstextes(l1i17) "Bots linkés"
set bstextes(l1i14) "Pas de bots linkés"
set bstextes(l1i15) "Pas de bots délinkés"
set bstextes(l1i16) "Bot délinké"
set bstextes(l1i18) "Bots délinkés"
set bstextes(l1i19) "Bots les plus instables"
set bstextes(l1i20) "classement / bot / nombre de links/délinks"
set bstextes(l1i21) "Plus grand HUB"
set bstextes(l1i22) "classement / bot / nombre de bots linkés"
set bstextes(l1i23) "Utilisation des versions de l'Eggdrop"
set bstextes(l1i24) "Utilisation des branches"
set bstextes(l1i25) "Utilisation des versions"
set bstextes(l1i26) "bot utilise"
set bstextes(l1i27) "bots utilisent"
set bstextes(l1i28) "BotnetStats.tcl v.$bsver -
Http://www.eggdrop-fr.org - par Lucas & Vanessa"
set bstextes(l1i29) "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//FR\">"
set bstextes(l1i30) "Class."
set bstextes(l1i31) "Nick du bot"
set bstextes(l1i32) "Splits"
set bstextes(l1i33) "Nick du Hub"
set bstextes(l1i34) "Bots"
set bstextes(l1i35) "Branche"
set bstextes(l1i36) "Graphique"
set bstextes(l1i37) "Version"
set bstextes(l1i38) "Dernière mise à jour"
set bstextes(l1i39) "<H1>BotnetStats.tcl v.$bsver - <A HREF=\"http://www.eggdrop-fr.org\">http://www.eggdrop-fr.org</A> - par Lucas Nussbaum & Vanessa
Sculier</H1>"
set bstextes(l1i40) "Bonjour ! je génère des statistiques sur ce botnet. Jetez un coup d'oeil sur"
set bstextes(l1i41) "<font color=\"red\">rouge : </FONT>Dernière version de chaque branche"
putlog [bst 1]