\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82
| Path : /usr/share/doc/hping3/examples/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : //usr/share/doc/hping3/examples/showled.htcl |
package require Tk
set bgcolor {#FFFFFF}
wm title . {hping3 -- showled}
set w .main
frame $w
pack $w -side top
. config -background $bgcolor
$w config -background $bgcolor
# canvas
set ifnum [llength [hping iflist]]
canvas $w.can -width 100 -height [expr ($ifnum*25)+40]
$w.can config -background $bgcolor
pack $w.can -fill both -expand true
# show leds
proc draw {} {
global w
set ifnum [llength [hping iflist]]
$w.can config -width 100 -height [expr ($ifnum*25)+40]
$w.can delete all
set y 20
foreach i [hping iflist] {
set ifname [lindex $i 0]
if {[string match *NOLINK* [lindex $i 4]]} {
set color red
} else {
set color green
}
$w.can create oval 20 $y 40 [expr $y+20] -fill $color -width 1 -outline black -tag $ifname
$w.can create text 60 [expr $y+10] -text $ifname -tag $ifname.t
incr y 25
}
after 1000 draw
}
after 0 draw
#vim: set filetype=tcl softtabstop=4