#!/usr/local/bin/python # -*- coding: iso-8859-15 -*- """ BC (Border-Check) is a tool to retrieve info of traceroute tests over website navigation routes. GPLv3 - 2013 by psy (epsylon@riseup.net) """ from xml.dom.minidom import parseString # extract data from a xml file file = open('data.xml','r') data = file.read() file.close() dom = parseString(data) xmlTag = dom.getElementsByTagName('travel')[0].toxml() xmlData= xmlTag.replace('','').replace('','') xmlHost = dom.getElementsByTagName('host')[0].toxml() xmlIP = dom.getElementsByTagName('ip')[0].toxml() xmlRoutes = dom.getElementsByTagName('routes')[0].toxml() xmlMeta = dom.getElementsByTagName('meta')[0].toxml() output = """ Border Check - Web Visualizator
Host: """+xmlHost+"""
IP: """+xmlIP+"""
Packages Route: """+xmlRoutes+"""
Metadata: """+xmlMeta+"""
"""