Exemple #1
0
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
"""

__all__ = ["ODTReport"]

from golismero.api.external import tempfile
from golismero.api.logger import Logger
from golismero.api.plugin import import_plugin

rstext = import_plugin("rst.py")

from warnings import catch_warnings


#------------------------------------------------------------------------------
class ODTReport(rstext.RSTReport):
    """
    Creates reports in OpenOffice document format (.odt).
    """

    EXTENSION = ".odt"

    #--------------------------------------------------------------------------
    def generate_report(self, output_file):
        Logger.log_verbose("Writing OpenOffice report to file: %s" %
Exemple #2
0
from golismero.api.data.information import Information
from golismero.api.data.vulnerability import Vulnerability
from golismero.api.data.vulnerability.vuln_utils import TAXONOMY_NAMES
from golismero.api.external import tempfile
from golismero.api.logger import Logger
from golismero.api.plugin import import_plugin, get_plugin_name

from collections import Counter
from zipfile import ZipFile, ZIP_DEFLATED

import cgi
import os
import os.path
import warnings

json = import_plugin("json.py")


#------------------------------------------------------------------------------
class HTMLReport(json.JSONOutput):
    """
    Writes reports as offline web pages.
    """


    #--------------------------------------------------------------------------
    def is_supported(self, output_file):
        if not output_file:
            return False
        output_file = output_file.lower()
        return (
Exemple #3
0
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
"""

__all__ = ["LatexReport"]

import warnings
import sys

from os.path import abspath, split

from golismero.api.external import tempfile
from golismero.api.logger import Logger
from golismero.api.plugin import import_plugin

rstext = import_plugin("rst.py")


#------------------------------------------------------------------------------
class LatexReport(rstext.RSTReport):
    """
    Creates reports in LaTeX format (.tex).
    """

    EXTENSION = ".tex"


    #--------------------------------------------------------------------------
    def generate_report(self, output_file):

        # Workaround for docutils bug, see:
Exemple #4
0
from golismero.api.data.information import Information
from golismero.api.data.vulnerability import Vulnerability
from golismero.api.data.vulnerability.vuln_utils import TAXONOMY_NAMES
from golismero.api.external import tempfile
from golismero.api.logger import Logger
from golismero.api.plugin import import_plugin, get_plugin_name

from collections import Counter
from zipfile import ZipFile, ZIP_DEFLATED

import cgi
import os
import os.path
import warnings

json = import_plugin("json.py")


#------------------------------------------------------------------------------
class HTMLReport(json.JSONOutput):
    """
    Writes reports as offline web pages.
    """

    #--------------------------------------------------------------------------
    def is_supported(self, output_file):
        if not output_file:
            return False
        output_file = output_file.lower()
        return (output_file.endswith(".html") or output_file.endswith(".htm")
                or output_file.endswith(".zip"))