lappend auto_path ./bin3/lib/tnm2.1.11; package re Tnm; rename bgerror {}; kons_font 11; wm geom .konsola 838x649+400+298; wm withdraw .; wm withdraw .output; # !!! przed uruchomieniem konsoli wykonaj: ". ./e3" !!! exec id #% uid=500(mhanckow) gid=1001(mhanckow) groups=1001(mhanckow) # dns # dns address b2-34.sci.wmi.amu.edu.pl #% 150.254.77.78 dns address b2-30.sci.wmi.amu.edu.pl #% 150.254.77.74 dns name 150.254.77.74 #% b2-30.sci.wmi.amu.edu.pl dns address print.labs.wmi.amu.edu.pl #% 150.254.78.44 dns soa b2-34.sci.wmi.amu.edu.pl #% net.wmi.amu.edu.pl dns soa print.labs.wmi.amu.edu.pl #% dc1.labs.wmi.amu.edu.pl # netdb ip range/class # + obsluga plikow w /etc/, adresow ip, i inne # proc ip_rev a { # proc naprawiajaca blad w repr. adr. ip w Tnm !!! set a2 [split $a .] foreach {b1 b2 b3 b4} $a2 break return [join "$b4 $b3 $b2 $b1" .] } proc ip_rev_list l {set _ {}; foreach e $l {lappend _ [ip_rev $e]}; set _} proc usun0 x {set x [string trimleft $x 0]; if {$x==""} {set x 0}; set x} proc bity x {usun0 [binary scan [binary format I $x] B* x; set x]} bity 240 #% 11110000 set x1 [ip_rev_list [netdb ip range 150.254.77.3 255.255.255.240]] #% 150.254.77.4 150.254.77.5 150.254.77.6 150.254.77.7 150.254.77.8 150.254.77.9 150.254.77.10 150.254.77.11 150.254.77.12 150.254.77.13 150.254.77.14 150.254.77.15 150.254.77.16 150.254.77.17 llength $x1 #% 14 # + dziala tylko dla spojnego ciagu jedynek w masce!!! # + nie ma samych 0 i samych 1 # icmp # icmp echo 150.254.77.44 #% {150.254.77.44 1} netdb ip class 150.254.77.74 #% B time {icmp echo {150.254.77.45}} #% 4998452 microseconds per iteration time {icmp echo {150.254.77.45 150.254.77.46 150.254.77.47}} #% 4994556 microseconds per iteration # + zawsze 5sek, niezaleznie od liczby hostow !!! icmp echo {150.254.77.45 150.254.77.46 150.254.77.47} #% {150.254.77.45 -1} {150.254.77.46 -1} {150.254.77.47 -1} icmp echo {faculty.wmi.amu.edu.pl main3.amu.edu.pl wp.pl onet.pl onet.pl 150.254.77.45} #% {faculty.wmi.amu.edu.pl 1} {main3.amu.edu.pl 1} {wp.pl 7} {onet.pl 11} {onet.pl 11} {150.254.77.45 -1} # + jako nie-root powoduje wylaczenie ntping!! icmp timestamp 150.254.77.44 #% {150.254.77.44 0} icmp mask 150.254.77.44 #% {150.254.77.44 0.0.0.0} # + nie odpowiada sensownie... # ntp # + dlaczego to nie dziala ??? ntp ntp.nask.pl q ntp pl.pool.ntp.org q array get q # Tnm tworzy proces potomny... # exec ps -Oppid #% PID PPID S TTY TIME COMMAND 8299 8293 S pts/0 00:00:00 bash 8923 1 S pts/0 00:00:01 /root/tcl/kit/tclkit /root/tcl/konsola2c_puppy.t 9061 8923 S pts/0 00:00:00 /root/zajecia/sik/scotty_tclkit/bin3/bin/ntping 10862 8923 R pts/0 00:00:00 ps-FULL -Oppid # udp ??? # set u1 [udp open 10000] #% udp3 udp info $u1 #% 0.0.0.0 10000 0.0.0.0 0 udp close $u1 #%