Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33486

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

Path csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.069
X-Spam-Evidence '*H*': 0.86; '*S*': 0.00; 'subject:Python': 0.05; 'bits': 0.07; 'craft': 0.09; 'hostname': 0.09; '(the': 0.15; 'cases)': 0.16; 'color.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lookups': 0.16; 'set,': 0.16; 'traverse': 0.16; 'wrote:': 0.17; 'config': 0.17; 'network.': 0.17; "shouldn't": 0.17; 'file.': 0.20; 'received:209.85.214.174': 0.21; "i've": 0.23; 'idea': 0.24; 'device': 0.24; 'script': 0.24; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'firewall': 0.29; 'this.': 0.29; "i'm": 0.29; 'basic': 0.30; '(and': 0.32; 'switch': 0.32; 'could': 0.32; 'says': 0.33; 'to:addr:python-list': 0.33; 'program,': 0.34; 'received:google.com': 0.34; 'done': 0.34; 'generic': 0.35; 'nov': 0.35; 'stable': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'but': 0.36; 'too': 0.36; 'skip:p 20': 0.36; 'subject: (': 0.36; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'easily': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'your': 0.60; 'address': 0.60; 'most': 0.61; 'you.': 0.61; 'save': 0.61; 'identify': 0.61; 'traffic': 0.61; 'is.': 0.62; 'show': 0.63; 'here': 0.65; 'identifying': 0.65; 'reverse': 0.65; 'wish': 0.70; 'sounds': 0.71; 'yourself': 0.77; 'fancy.': 0.84; 'firewalls': 0.84; 'red.': 0.84; 'that)': 0.84; 'glance': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=ExZZKRine8VOdiavSjtWCLj19s5T+2B+c01TSbT1eTM=; b=qZ4H+WVhHiyriXxsLOiOojDxKaUNAeqE9wpEiDbD1zxFp8qL2+fobjfepAQSJiqqrl 1HRHnfftiADzeM1METwk9+evJCE1J1aK6fFjflQK71qlGjHj4KnhCPSOnNxKY2xWVagh L224FUQoeoTMrXpu68xv0hj27ReeiaEmi6SKY8NlokdH+ziwfwbMpsRpfPdQLsZ+fY9m X8v52sUFnofJjiGstTVZKL7Ggk7Mxj/uumUtMqPrs71omBKi0OnwU9tVRSyTWsW6Ih+5 Xm2ycu64cy8HRyerchNxuHko+ibGhzRJPNVQx22xK8URy1j6HHk6ZpSWs61VtJmhU6e4 fnRg==
MIME-Version 1.0
In-Reply-To <c5f40ace-71eb-4e02-a400-1cfb88543e66@googlegroups.com>
References <6ea528f6-e4c2-4da9-a011-d81f13b83d28@googlegroups.com> <mailman.3774.1353175657.27098.python-list@python.org> <roy-EFAEEF.13385317112012@news.panix.com> <mailman.3778.1353177966.27098.python-list@python.org> <c5f40ace-71eb-4e02-a400-1cfb88543e66@googlegroups.com>
Date Sun, 18 Nov 2012 09:00:10 +1100
Subject Re: Python Script for Colorizing Traceroute Output (apologies for top-post)
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3782.1353189613.27098.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353189613 news.xs4all.nl 6968 [2001:888:2000:d::a6]:58668
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33486

Show key headers only | View raw


On Sun, Nov 18, 2012 at 6:59 AM, Jordan Bylsma <jordan.bylsma1@gmail.com> wrote:
> For this case the firewalls DO respond to TTL(in most cases) and will show in a traceroute. The objective here is to colorize particular devices to easily see what type of devices traffic would traverse across the network. I would be using a database of device hostnames that when they match in traceroute they would be printed a particular color. Something like router=green, layer 3 switch yellow, and firewall red. I'm just looking for a basic script to accomplish this. Nothing too fancy.

Sounds like the previously-mentioned Generic Colo(u)?ri(s|z)er (and
yes, its README says exactly that) could do that for you. You'd need
to craft a regexp to identify each hostname set, rather than using a
database, but it shouldn't be difficult to write a script to create
grc's config file.

I've never used the program, though, so I have no idea how good it is.
All I've done is download the tar.gz and glance over a few bits (the
licence, mainly - which is mostly-GPL).

By the way, you may wish to consider identifying your devices by IP
address rather than hostname. If your IPs are stable and readable, you
could save yourself the delays of reverse DNS lookups by simply
colorizing the IPs.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python Script for Colorizing Traceroute Output Jordan Bylsma <jordan.bylsma1@gmail.com> - 2012-11-17 07:04 -0800
  Re: Python Script for Colorizing Traceroute Output garabik-news-2005-05@kassiopeia.juls.savba.sk - 2012-11-17 15:18 +0000
  Re: Python Script for Colorizing Traceroute Output wrw@mac.com - 2012-11-17 12:06 -0500
  Re: Python Script for Colorizing Traceroute Output (apologies for top-post) wrw@mac.com - 2012-11-17 12:07 -0500
    Re: Python Script for Colorizing Traceroute Output (apologies for top-post) Roy Smith <roy@panix.com> - 2012-11-17 13:38 -0500
      Re: Python Script for Colorizing Traceroute Output (apologies for top-post) Chris Angelico <rosuav@gmail.com> - 2012-11-18 05:45 +1100
        Re: Python Script for Colorizing Traceroute Output (apologies for top-post) Jordan Bylsma <jordan.bylsma1@gmail.com> - 2012-11-17 11:59 -0800
          Re: Python Script for Colorizing Traceroute Output (apologies for top-post) Chris Angelico <rosuav@gmail.com> - 2012-11-18 09:00 +1100
            Re: Python Script for Colorizing Traceroute Output (apologies for top-post) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-18 01:18 +0000
              Re: Python Script for Colorizing Traceroute Output (apologies for top-post) Chris Angelico <rosuav@gmail.com> - 2012-11-18 12:27 +1100
        Re: Python Script for Colorizing Traceroute Output (apologies for top-post) Jordan Bylsma <jordan.bylsma1@gmail.com> - 2012-11-17 11:59 -0800

csiph-web