From a2a8dd57953db5837faa5028bce75a468ecf94fe Mon Sep 17 00:00:00 2001 From: skyanth Date: Mon, 3 Jul 2017 15:10:56 +0200 Subject: [PATCH 1/7] Exec summary switch now generates report as well as executive summary (and not just the summary) --- xml/xslt/generate_report.xsl | 18 ++++++++++-------- xml/xslt/inline.xslt | 3 ++- xml/xslt/meta.xslt | 6 ++++-- xml/xslt/numbering.xslt | 3 ++- xml/xslt/structure.xslt | 6 ++++-- xml/xslt/toc.xslt | 14 ++++++++------ 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/xml/xslt/generate_report.xsl b/xml/xslt/generate_report.xsl index fbb4e43..beebdc6 100644 --- a/xml/xslt/generate_report.xsl +++ b/xml/xslt/generate_report.xsl @@ -58,26 +58,28 @@ - - + - + + + - - + - + + + - - + + diff --git a/xml/xslt/inline.xslt b/xml/xslt/inline.xslt index 4140f29..353b9cd 100644 --- a/xml/xslt/inline.xslt +++ b/xml/xslt/inline.xslt @@ -4,6 +4,7 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0"> + @@ -20,7 +21,7 @@ DOCUMENT + test="(starts-with(@href, '#') and //*[@id = $destination][ancestor-or-self::*[@visibility = 'hidden']]) or (starts-with(@href, '#') and $execsummary=true() and //*[@id = $destination][ancestor-or-self::*[not(@inexecsummary='yes')]])"> WARNING: LINK TARGET IS HIDDEN diff --git a/xml/xslt/meta.xslt b/xml/xslt/meta.xslt index fd6d87f..ec114bd 100644 --- a/xml/xslt/meta.xslt +++ b/xml/xslt/meta.xslt @@ -5,6 +5,7 @@ version="2.0"> + @@ -20,7 +21,7 @@ - + PENETRATION TEST MANAGEMENT SUMMARY @@ -61,6 +62,7 @@ + @@ -96,7 +98,7 @@ - + PENETRATION TEST MANAGEMENT SUMMARY diff --git a/xml/xslt/numbering.xslt b/xml/xslt/numbering.xslt index 12232bd..934b863 100644 --- a/xml/xslt/numbering.xslt +++ b/xml/xslt/numbering.xslt @@ -36,8 +36,9 @@ + - + Appendix  + - + @@ -29,6 +30,7 @@ + @@ -41,7 +43,7 @@ - + Appendix  - + - + @@ -40,6 +40,7 @@ + @@ -66,7 +67,7 @@ - + @@ -95,10 +96,11 @@ + - + Appendix  @@ -112,7 +114,7 @@ - + App  - + From d58d8afe9051fcbe8816cfdda9d5c900b320eb96 Mon Sep 17 00:00:00 2001 From: skyanth Date: Mon, 3 Jul 2017 15:11:20 +0200 Subject: [PATCH 2/7] Revert "Exec summary switch now generates report as well as executive summary (and not just the summary)" This reverts commit a2a8dd57953db5837faa5028bce75a468ecf94fe. --- xml/xslt/generate_report.xsl | 18 ++++++++---------- xml/xslt/inline.xslt | 3 +-- xml/xslt/meta.xslt | 6 ++---- xml/xslt/numbering.xslt | 3 +-- xml/xslt/structure.xslt | 6 ++---- xml/xslt/toc.xslt | 14 ++++++-------- 6 files changed, 20 insertions(+), 30 deletions(-) diff --git a/xml/xslt/generate_report.xsl b/xml/xslt/generate_report.xsl index beebdc6..fbb4e43 100644 --- a/xml/xslt/generate_report.xsl +++ b/xml/xslt/generate_report.xsl @@ -58,28 +58,26 @@ - + + - - - + - + + - - - + - - + + diff --git a/xml/xslt/inline.xslt b/xml/xslt/inline.xslt index 353b9cd..4140f29 100644 --- a/xml/xslt/inline.xslt +++ b/xml/xslt/inline.xslt @@ -4,7 +4,6 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0"> - @@ -21,7 +20,7 @@ DOCUMENT + test="(starts-with(@href, '#') and //*[@id = $destination][ancestor-or-self::*[@visibility = 'hidden']]) or (starts-with(@href, '#') and $EXEC_SUMMARY=true() and //*[@id = $destination][ancestor-or-self::*[not(@inexecsummary='yes')]])"> WARNING: LINK TARGET IS HIDDEN diff --git a/xml/xslt/meta.xslt b/xml/xslt/meta.xslt index ec114bd..fd6d87f 100644 --- a/xml/xslt/meta.xslt +++ b/xml/xslt/meta.xslt @@ -5,7 +5,6 @@ version="2.0"> - @@ -21,7 +20,7 @@ - + PENETRATION TEST MANAGEMENT SUMMARY @@ -62,7 +61,6 @@ - @@ -98,7 +96,7 @@ - + PENETRATION TEST MANAGEMENT SUMMARY diff --git a/xml/xslt/numbering.xslt b/xml/xslt/numbering.xslt index 934b863..12232bd 100644 --- a/xml/xslt/numbering.xslt +++ b/xml/xslt/numbering.xslt @@ -36,9 +36,8 @@ - - + Appendix  - - + @@ -30,7 +29,6 @@ - @@ -43,7 +41,7 @@ - + Appendix  - + - + @@ -40,7 +40,6 @@ - @@ -67,7 +66,7 @@ - + @@ -96,11 +95,10 @@ - - + Appendix  @@ -114,7 +112,7 @@ - + App  - + From 30c46e0a515bfc8a15065e99217fb1b9e9d0d1c6 Mon Sep 17 00:00:00 2001 From: skyanth Date: Mon, 3 Jul 2017 15:14:39 +0200 Subject: [PATCH 3/7] Fixed exec summary --- xml/xslt/generate_report.xsl | 18 ++++++++++-------- xml/xslt/inline.xslt | 3 ++- xml/xslt/meta.xslt | 6 ++++-- xml/xslt/numbering.xslt | 3 ++- xml/xslt/structure.xslt | 6 ++++-- xml/xslt/toc.xslt | 14 ++++++++------ 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/xml/xslt/generate_report.xsl b/xml/xslt/generate_report.xsl index fbb4e43..beebdc6 100644 --- a/xml/xslt/generate_report.xsl +++ b/xml/xslt/generate_report.xsl @@ -58,26 +58,28 @@ - - + - + + + - - + - + + + - - + + diff --git a/xml/xslt/inline.xslt b/xml/xslt/inline.xslt index 4140f29..353b9cd 100644 --- a/xml/xslt/inline.xslt +++ b/xml/xslt/inline.xslt @@ -4,6 +4,7 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0"> + @@ -20,7 +21,7 @@ DOCUMENT + test="(starts-with(@href, '#') and //*[@id = $destination][ancestor-or-self::*[@visibility = 'hidden']]) or (starts-with(@href, '#') and $execsummary=true() and //*[@id = $destination][ancestor-or-self::*[not(@inexecsummary='yes')]])"> WARNING: LINK TARGET IS HIDDEN diff --git a/xml/xslt/meta.xslt b/xml/xslt/meta.xslt index fd6d87f..ec114bd 100644 --- a/xml/xslt/meta.xslt +++ b/xml/xslt/meta.xslt @@ -5,6 +5,7 @@ version="2.0"> + @@ -20,7 +21,7 @@ - + PENETRATION TEST MANAGEMENT SUMMARY @@ -61,6 +62,7 @@ + @@ -96,7 +98,7 @@ - + PENETRATION TEST MANAGEMENT SUMMARY diff --git a/xml/xslt/numbering.xslt b/xml/xslt/numbering.xslt index 12232bd..934b863 100644 --- a/xml/xslt/numbering.xslt +++ b/xml/xslt/numbering.xslt @@ -36,8 +36,9 @@ + - + Appendix  + - + @@ -29,6 +30,7 @@ + @@ -41,7 +43,7 @@ - + Appendix  - + - + @@ -40,6 +40,7 @@ + @@ -66,7 +67,7 @@ - + @@ -95,10 +96,11 @@ + - + Appendix  @@ -112,7 +114,7 @@ - + App  - + From b634c6871979c19a6cc814b931c6e450530ffb26 Mon Sep 17 00:00:00 2001 From: skyanth Date: Mon, 3 Jul 2017 15:16:42 +0200 Subject: [PATCH 4/7] execsummary option for report build command fixed --- chatops/python/docbuilder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chatops/python/docbuilder.py b/chatops/python/docbuilder.py index 03de083..8f1f53a 100644 --- a/chatops/python/docbuilder.py +++ b/chatops/python/docbuilder.py @@ -56,13 +56,13 @@ the Free Software Foundation, either version 3 of the License, or help='overwrite output file if it already exists') parser.add_argument('-date', action='store', help='the invoice date') - parser.add_argument('-execsummary', action='store', + parser.add_argument('-execsummary', action='store_true', help="""create an executive summary as well as a report (true/false). Default: false """) parser.add_argument('--fop-config', action='store', - default='/etc/docbuilder/fop.xconf', + default='/etc/docbuilder/fop.conf', help="""fop configuration file (default - /etc/docbuilder/fop.xconf""") + /etc/docbuilder/fop.conf""") parser.add_argument('-f', '--fop', action='store', default='../target/report.fo', help="""intermediate fop output file (default: @@ -151,7 +151,7 @@ def to_fo(options): if options['date']: cmd.append('DATE=' + options['date']) if options['execsummary']: - cmd.append('EXEC_SUMMARY=' + options['execsummary']) + cmd.append('EXEC_SUMMARY=true') process = subprocess.Popen(cmd, stdout=PIPE, stderr=PIPE) stdout, stderr = process.communicate() print_output(stdout, stderr) @@ -234,7 +234,7 @@ def main(): except OSError as exception: print_exit('[-] ERR: {0}'.format(exception.strerror), exception.errno) - if options['execsummary'] == 'true': # we're generating a summary as well as a report + if options['execsummary'] == True: # we're generating a summary as well as a report report_output = options['output'] verboseprint('generating additional executive summary') output_dir = os.path.dirname(options['output']) @@ -260,4 +260,4 @@ def main(): if __name__ == "__main__": - main() + main() \ No newline at end of file From e06b7f139927b7fcb2b77f5d0bdee38293a28b7e Mon Sep 17 00:00:00 2001 From: skyanth Date: Mon, 3 Jul 2017 15:21:06 +0200 Subject: [PATCH 5/7] changed fop.conf back to fop.xconf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sorry for the confusion… :/ --- chatops/python/docbuilder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatops/python/docbuilder.py b/chatops/python/docbuilder.py index 8f1f53a..8c51651 100644 --- a/chatops/python/docbuilder.py +++ b/chatops/python/docbuilder.py @@ -60,9 +60,9 @@ the Free Software Foundation, either version 3 of the License, or help="""create an executive summary as well as a report (true/false). Default: false """) parser.add_argument('--fop-config', action='store', - default='/etc/docbuilder/fop.conf', + default='/etc/docbuilder/fop.xconf', help="""fop configuration file (default - /etc/docbuilder/fop.conf""") + /etc/docbuilder/fop.xconf""") parser.add_argument('-f', '--fop', action='store', default='../target/report.fo', help="""intermediate fop output file (default: From 10901ab8b5e7e543f47bbed988c4268e2b6e34bb Mon Sep 17 00:00:00 2001 From: skyanth Date: Mon, 3 Jul 2017 15:28:53 +0200 Subject: [PATCH 6/7] exec summary switch no longer prevents other docs from being generated --- xml/xslt/generate_contract.xsl | 4 +++- xml/xslt/generate_document.xsl | 4 +++- xml/xslt/generate_invoice.xsl | 4 +++- xml/xslt/generate_offerte.xsl | 4 +++- xml/xslt/generate_ratecard.xsl | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/xml/xslt/generate_contract.xsl b/xml/xslt/generate_contract.xsl index a4219aa..0426b98 100644 --- a/xml/xslt/generate_contract.xsl +++ b/xml/xslt/generate_contract.xsl @@ -58,7 +58,9 @@ - + + + diff --git a/xml/xslt/generate_document.xsl b/xml/xslt/generate_document.xsl index 888442e..e2cbe88 100644 --- a/xml/xslt/generate_document.xsl +++ b/xml/xslt/generate_document.xsl @@ -49,7 +49,9 @@ - + + + diff --git a/xml/xslt/generate_invoice.xsl b/xml/xslt/generate_invoice.xsl index 798ecdd..b2f8dc0 100644 --- a/xml/xslt/generate_invoice.xsl +++ b/xml/xslt/generate_invoice.xsl @@ -38,7 +38,9 @@ - + + + diff --git a/xml/xslt/generate_offerte.xsl b/xml/xslt/generate_offerte.xsl index 39b6e67..b273bc4 100644 --- a/xml/xslt/generate_offerte.xsl +++ b/xml/xslt/generate_offerte.xsl @@ -69,7 +69,9 @@ - + + + diff --git a/xml/xslt/generate_ratecard.xsl b/xml/xslt/generate_ratecard.xsl index 6204405..22ab0c3 100644 --- a/xml/xslt/generate_ratecard.xsl +++ b/xml/xslt/generate_ratecard.xsl @@ -59,7 +59,9 @@ - + + + From 66907dc5a201e0b5e0ca574f826850744d682961 Mon Sep 17 00:00:00 2001 From: skyanth Date: Mon, 3 Jul 2017 15:45:31 +0200 Subject: [PATCH 7/7] deprecating summary.xsl(t) --- xml/xslt/summary.xsl | 53 ------- xml/xslt/summary.xslt | 339 ------------------------------------------ 2 files changed, 392 deletions(-) delete mode 100644 xml/xslt/summary.xsl delete mode 100644 xml/xslt/summary.xslt diff --git a/xml/xslt/summary.xsl b/xml/xslt/summary.xsl deleted file mode 100644 index 13e72c3..0000000 --- a/xml/xslt/summary.xsl +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xml/xslt/summary.xslt b/xml/xslt/summary.xslt deleted file mode 100644 index c2850c9..0000000 --- a/xml/xslt/summary.xslt +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for - - - - - - - - - - - - - - - V - - - Amsterdam, - - - - - - - - - - - - - - - - - - - - - - - - Document Properties - - - - - - - - Client - - - - - - - - - - Title - - - - - - - - - - Targets - - - - - - - - - - - - - - - - - - - - - - - - - Version - - - - - - - - - - Pentesters - - - - - - - - - , - - - - - - - - Authors - - - - - - , - - - - - - - - - Reviewed by - - - - - - - - - - - - - - Approved by - - - - - - - - - - - - - - - Version control - - - - - - - - - - Version - - - Date - - - Author - - - Description - - - - - - - - - - - - - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - - - - - 0. - - - - - - - - - - - - Contact - For more information about this Document and its - contents please contact Radically Open Security BV. - - - - - - - - Name - - - - - - - - - - Address - - - - - - - - - - Phone - - - - - - - - - - Email - - - - - - - - - - - - -