Date: Sun, 20 Nov 2016 14:03:12 +0000 (UTC) From: Antoine Brodin <antoine@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r426592 - in head/security/py-volatility: . files Message-ID: <201611201403.uAKE3C9j096987@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: antoine Date: Sun Nov 20 14:03:12 2016 New Revision: 426592 URL: https://svnweb.freebsd.org/changeset/ports/426592 Log: Adjust to run with openpyxl 2.4.0 Added: head/security/py-volatility/files/patch-volatility_plugins_malware_psxview.py (contents, props changed) head/security/py-volatility/files/patch-volatility_renderers_xlsx.py (contents, props changed) Modified: head/security/py-volatility/Makefile Modified: head/security/py-volatility/Makefile ============================================================================== --- head/security/py-volatility/Makefile Sun Nov 20 14:01:53 2016 (r426591) +++ head/security/py-volatility/Makefile Sun Nov 20 14:03:12 2016 (r426592) @@ -3,6 +3,7 @@ PORTNAME= volatility PORTVERSION= 2.5 +PORTREVISION= 1 CATEGORIES= security python MASTER_SITES= http://downloads.volatilityfoundation.org/releases/${PORTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Added: head/security/py-volatility/files/patch-volatility_plugins_malware_psxview.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-volatility/files/patch-volatility_plugins_malware_psxview.py Sun Nov 20 14:03:12 2016 (r426592) @@ -0,0 +1,67 @@ +--- volatility/plugins/malware/psxview.py.orig 2015-10-21 20:39:22 UTC ++++ volatility/plugins/malware/psxview.py +@@ -35,8 +35,8 @@ import volatility.plugins.addrspaces.sta + try: + from openpyxl.workbook import Workbook + from openpyxl.writer.excel import ExcelWriter +- from openpyxl.cell import get_column_letter +- from openpyxl.styles import Color, Fill, Style, PatternFill, Border, Side, Alignment, Protection, Font ++ from openpyxl.utils import get_column_letter ++ from openpyxl.styles import Color, Fill, NamedStyle, PatternFill, Border, Side, Alignment, Protection, Font + from openpyxl.cell import Cell + from openpyxl import load_workbook + has_openpyxl = True +@@ -233,7 +233,7 @@ class PsXview(common.AbstractWindowsComm + yield offset, source[offset], ps_sources + + def render_xlsx(self, outfd, data): +- BoldStyle = Style(font=Font(name='Calibri', ++ BoldStyle = NamedStyle(name='BoldStyle', font=Font(name='Calibri', + size=11, + bold=True, + italic=False, +@@ -244,7 +244,7 @@ class PsXview(common.AbstractWindowsComm + fill=PatternFill(fill_type="solid", + start_color='FF000000', + end_color='FF000000')) +- RedStyle = Style(font=Font(name='Calibri', ++ RedStyle = NamedStyle(name='RedStyle', font=Font(name='Calibri', + size=11, + bold=False, + italic=False, +@@ -272,7 +272,7 @@ class PsXview(common.AbstractWindowsComm + fill=PatternFill(start_color = 'FFFF0000', + end_color = 'FFFF0000', + fill_type = 'solid')) +- GreenStyle = Style(font=Font(name='Calibri', ++ GreenStyle = NamedStyle(name='GreenStyle', font=Font(name='Calibri', + size=11, + bold=False, + italic=False, +@@ -284,7 +284,7 @@ class PsXview(common.AbstractWindowsComm + end_color = "FF00FF00", + fill_type = "solid")) + +- wb = Workbook(optimized_write = True) ++ wb = Workbook(write_only = True) + ws = wb.create_sheet() + ws.title = "Psxview Output" + ws.append(["Offset (P)", +@@ -350,13 +350,13 @@ class PsXview(common.AbstractWindowsComm + wb = load_workbook(filename = self._config.OUTPUT_FILE) + ws = wb.get_sheet_by_name(name = "Psxview Output") + for col in xrange(1, 12): +- ws.cell("{0}{1}".format(get_column_letter(col), 1)).style = BoldStyle ++ ws["{0}{1}".format(get_column_letter(col), 1)].style = BoldStyle + for row in xrange(2, total + 1): + for col in xrange(4, 11): +- if ws.cell("{0}{1}".format(get_column_letter(col), row)).value == "False": +- ws.cell("{0}{1}".format(get_column_letter(col), row)).style = RedStyle ++ if ws["{0}{1}".format(get_column_letter(col), row)].value == "False": ++ ws["{0}{1}".format(get_column_letter(col), row)].style = RedStyle + else: +- ws.cell("{0}{1}".format(get_column_letter(col), row)).style = GreenStyle ++ ws["{0}{1}".format(get_column_letter(col), row)].style = GreenStyle + wb.save(filename = self._config.OUTPUT_FILE) + + def unified_output(self, data): Added: head/security/py-volatility/files/patch-volatility_renderers_xlsx.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-volatility/files/patch-volatility_renderers_xlsx.py Sun Nov 20 14:03:12 2016 (r426592) @@ -0,0 +1,22 @@ +--- volatility/renderers/xlsx.py.orig 2015-10-21 20:39:22 UTC ++++ volatility/renderers/xlsx.py +@@ -6,8 +6,8 @@ __author__ = "gleeda" + try: + from openpyxl.workbook import Workbook + from openpyxl.writer.excel import ExcelWriter +- from openpyxl.cell import get_column_letter +- from openpyxl.styles import Color, Fill, Style, PatternFill, Border, Side, Alignment, Protection, Font ++ from openpyxl.utils import get_column_letter ++ from openpyxl.styles import Color, Fill, NamedStyle, PatternFill, Border, Side, Alignment, Protection, Font + from openpyxl.cell import Cell + from openpyxl import load_workbook + has_openpyxl = True +@@ -22,7 +22,7 @@ class XLSXRenderer(Renderer): + self._columns = None + self._text_cell_renderers_func = renderers_func + self._text_cell_renderers = None +- self._wb = Workbook(optimized_write = True) ++ self._wb = Workbook(write_only = True) + self._ws = self._wb.create_sheet() + + def description(self):
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611201403.uAKE3C9j096987>