#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #+++ [mx edo tracert] 0.2.15 #+++ 9/14/6 hkm #+++ #+++ Identifica los estados por los que pasa una conexion de Prodigy Mexico #+++ utiliza tracert.exe y solo checa keywords en los hosts. version beta. #+++ #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #aqui estan las listas de keywords @key = ("mex", "edo", "ver", "tab", "pue", "yuc", "tam", "tlx", "chi", "mty", "mor", "mch", "jal", "qro", "l200"); @word = ("DF/Mexico ", "Edo Mex ", "Veracruz ", "Tabasco ", "Puebla ", "Yucatan ", "Tamaulipas", "Tlaxcala ", "Chihuahua ", "Monterrey ", "Morelos ", "Michoacan ", "Jalisco ", "Queretaro ", "Infinitum "); #utilizamos el input default o pedimos el host/ip if (@ARGV == null){ print "tracert: "; chomp ($host=); print "\nEjecutando tracert a $host...\n\n"; @tracert = `tracert $host`; }else{ print "\nEjecutando tracert a @ARGV...\n\n"; @tracert = `tracert @ARGV`; } #guardamos en @temp lo que nos interesa del trace (host e ip) for ($i = 4; $i < @tracert-2; ++$i) #apartir de la linea 4 y terminamos en la -2 { push (@temp, substr($tracert[$i],30)); } for ($i = 0; $i < @temp; ++$i) #recorremos las lineas { for($e = 0; $e < @key; ++$e) #recorremos los keys { if ($temp[$i] =~/$key[$e]/) #buscamos el key { print "$word[$e]"; #imprimimos el word relacionado con el key (misma posicion) $e = @key; }else{ if ($e == $#key) { print " ? "; } } } print $temp[$i]; #imprimimos el host e ip }