3 import libxml2, re, sys
4 from distutils import version
6 doc = libxml2.readFd (sys.stdin.fileno(), None, None, 0)
7 ctx = doc.xpathNewContext()
8 res = ctx.xpathEval ("//application")
10 ctx.setContextNode(node)
11 name = ctx.xpathEval ("./name//text()")[0]
12 ver = ctx.xpathEval ("./version//text()")[0]
13 ver = version.StrictVersion (str(ver).split(' ')[0])
14 if re.search ("Mozilla Firefox", str(name)) and \
15 ver < version.StrictVersion ("3.6.16"):
16 print "Vulnerable version of Firefox found (%s)!" % ver