Code: Select all
##############################
# Create a Ascii map of your
# current botnet
##############################
proc asciimap {space bot} {
global version
botnet_uplinks
return "$bot \(<b>$version</b>\)<br>%n[mapgen $space $bot]"
}
##############################
# Show current uplinks
##############################
proc botnet_uplinks {} {
global botnet http botnet-nick botnetshare botnetvers
if {[array exists botnet]} {
array unset botnet
}
set botnet(${botnet-nick}) ${botnet-nick}
foreach x [botlist] {
set botnet([lindex $x 0]) [lindex $x 1]
set botnetshare([lindex $x 0]) [lindex $x 3]
set botnetvers([lindex $x 0]) [vrsres [lindex $x 2]]
}
}
##############################
# Create a Ascii map of your
# current botnet
##############################
proc mapgen {space bot} {
global botnet botnetshare botnetvers
foreach botlink [array names botnet] {
if {![string match $bot $botlink] && [string match $botnet($botlink) $bot]} {
if {[info exists downlinks]} {
lappend downlinks $botlink
} else {
set downlinks $botlink
}
}
}
if {![info exists downlinks]} {
return
}
foreach botlink $downlinks {
if {[string match $botlink [lindex $downlinks end]]} {
if {[info exist return]} {
append return "$space `-$botnetshare($botlink)$botlink \(<b>$botnetvers($botlink)</b>\) <br>%n"
} else {
set return "$space `-$botnetshare($botlink)$botlink \(<b>$botnetvers($botlink)</b>\) <br>%n"
}
mapgen "$space " $botlink
} else {
if {[info exists return]} {
append return "$space |-$botnetshare($botlink)$botlink \(<b>$botnetvers($botlink)</b>\) <br>%n"
} else {
set return "$space |-$botnetshare($botlink)$botlink \(<b>$botnetvers($botlink)</b>\) <br>%n"
}
mapgen "$space |- " $botlink
}
}
return ${return}
}