#!/usr/bin/python -tO
# freewvs 0.1 - the free web vulnerability scanner
#
# http://source.schokokeks.org/freewvs/
#
# Written 2007-2012 by schokokeks.org Hosting, http://www.schokokeks.org
#
# Contributions by
# Hanno Boeck, http://hboeck.de/
# Fabian Fingerle, http://www.fabian-fingerle.de/
# Bernd Wurst, http://bwurst.org/
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software. If not, see
# http://creativecommons.org/publicdomain/zero/1.0/
# Nevertheless, in case you use a significant part of this code, we ask (but
# not require, see the license) that you keep the authors' names in place and
# return your changes to the public. We would be especially happy if you tell
# us what you're going to do with this code.
try: # python3
import configparser
except ImportError: # python2
import ConfigParser as configparser
# overwrite default open() function
# this one supports encoding='...'
from codecs import open
import os, glob, pprint, re, optparse, sys, gettext
from xml.sax.saxutils import escape
gettext.textdomain('freewvs')
_ = gettext.gettext
def versioncompare(safe_version, find_version):
if safe_version == [""]:
return True
for i in range(min(len(find_version), len(safe_version))):
if int(find_version[i])<int(safe_version[i]):
return True
if int(find_version[i])>int(safe_version[i]):
return False
return (len(find_version)<len(safe_version))
def vulnprint(appname, version, safeversion, vuln, vfilename, subdir, style = None):
appdir = '/'.join(os.path.abspath(vfilename).split('/')[:-1-subdir])