diff --git a/framework/python/src/common/testreport.py b/framework/python/src/common/testreport.py index c9bde77f7..173133a12 100644 --- a/framework/python/src/common/testreport.py +++ b/framework/python/src/common/testreport.py @@ -19,7 +19,6 @@ from common import util import base64 import os -import markdown from test_orc.test_case import TestCase DATE_TIME_FORMAT = '%Y-%m-%d %H:%M:%S' @@ -214,7 +213,7 @@ def generate_pages(self, json_data): def generate_results_page(self, json_data, page_num): page = '
' - page += self.generate_header(json_data) + page += self.generate_header(json_data, (page_num == 1)) if page_num == 1: page += self.generate_summary(json_data) page += self.generate_results(json_data, page_num) @@ -223,106 +222,104 @@ def generate_results_page(self, json_data, page_num): page += '
' return page - def generate_module_pages(self, json_data, module_reports): - # ToDo: Figure out how to make this dynamic - # Content max size taken from css module-page-conten class - content_max_size = 913 - header_padding = 40 # Top and bottom padding for markdown headers - page_content = '' - pages = '' - content_size = 0 - content = module_reports.split('\n') - active_table = False - - for line in content: - if '' in line: - content_size += 39 - elif '
  • ' in line: - content_size += 20 - - if '' in line: - active_table = False - # If the current line is within the content size limit over the - # we'll add it to this page, otherweise, we'll put it on the next - # page. Also make sure that if there is less than 20 pixels - # left after a header, start a new page or the summary - # title will be left with no information after it. Current minimum - # summary item is 20 pixels, adjust if we update the
  • element. - if content_size >= content_max_size or ( - '\n' - if active_table else '') - page_content += line + '\n' - if len(page_content) > 0: - page = self.generate_module_page(json_data, page_content) - pages += page + '\n' - return pages - - def generate_module_page(self, json_data, module_reports): + def generate_module_page(self, json_data, module_report): self._cur_page += 1 page = '
    ' - page += self.generate_header(json_data) + page += self.generate_header(json_data, False) page += f'''
    - {module_reports} + {module_report}
    ''' page += self.generate_footer(self._cur_page) page += '
    ' #Page end page += '
    ' return page + def generate_module_pages(self, json_data): + pages = '' + content_max_size = 913 + + for module_reports in self._module_reports: + # ToDo: Figure out how to make this dynamic + # Padding values from CSS + # Element sizes from inspection of rendered report + h1_padding = 8 + module_summary_padding = 50 # 25 top and 25 bottom + + # Reset values for each module report + data_table_active = False + data_rows_active=False + page_content = '' + content_size = 0 + content = module_reports.split('\n') + + for line in content: + if '' in line and data_table_active: + data_table_active=False + + # Add module-data header size, ignore rows, should + # only be one so only care about a header existence + elif '' in line and data_table_active: + content_size += 41.333 + + # Track module-data table state + elif '' in line and data_table_active: + data_rows_active = True + elif '' in line and data_rows_active: + data_rows_active = False + + # Add appropriate content size for each data row + # update if CSS changes for this element + elif '' in line and data_rows_active: + content_size += 40.667 + + # If the current line is within the content size limit + # we'll add it to this page, otherweise, we'll put it on the next + # page. Also make sure that if there is less than 40 pixels + # left after a data row, start a new page or the row will get cut off. + # Current row size is 40.667 so rounding to 41 padding, + # adjust if we update the "module-data tbody tr" element. + if content_size >= content_max_size or ( + data_rows_active and content_max_size - content_size < 41): + # If in the middle of a table, close the table + if data_rows_active: + page_content += '' + page = self.generate_module_page(json_data, page_content) + pages += page + '\n' + content_size = 0 + # If in the middle of a data table, restart + # it for the rest of the rows + page_content = ('\n' + if data_rows_active else '') + page_content += line + '\n' + if len(page_content) > 0: + page = self.generate_module_page(json_data, page_content) + pages += page + '\n' + return pages + def generate_body(self, json_data): self._num_pages = 0 self._cur_page = 0 body = f''' {self.generate_pages(json_data)} - {self.generate_module_reports(json_data)} + {self.generate_module_pages(json_data)} ''' # Set the max pages after all pages have been generated return body.replace('MAX_PAGE', str(self._cur_page)) - def generate_module_reports(self, json_data): - content = '' - for module_report in self._module_reports: - # Convert markdown to html - markdown_html = markdown.markdown( - module_report, extensions=['markdown.extensions.tables']) - content += markdown_html + '\n' - - #Add styling to the markdown - content = content.replace('
    ', '
    ') - content = content.replace('

    ', '

    ') - content = content.replace('

    ', '

    ') - content = content.replace('

    ', '

    ') - - content = self.generate_module_pages(json_data=json_data, - module_reports=content) - - return content - def generate_footer(self, page_num): footer = f''' @@ -332,7 +329,6 @@ def generate_footer(self, page_num): def generate_results(self, json_data, page_num): result_list = ''' -

    Results List

    @@ -372,23 +368,37 @@ def generate_result(self, result): ''' return result_html - def generate_header(self, json_data): + def generate_header(self, json_data, first_page): with open(test_run_img_file, 'rb') as f: tr_img_b64 = base64.b64encode(f.read()).decode('utf-8') - return f''' -
    -

    Testrun report

    -

    {json_data["device"]["manufacturer"]} {json_data["device"]["model"]}

    - Test Run + header = '' + + if first_page: + header += f''' +
    +

    Testrun report

    +

    + {json_data["device"]["manufacturer"]} + {json_data["device"]["model"]} +

    ''' + else: + header += f''' +
    +

    Testrun report

    +

    + {json_data["device"]["manufacturer"]} + {json_data["device"]["model"]} +

    ''' + header += f'''Testrun
    ''' + return header def generate_summary(self, json_data): # Generate the basic content section layout summary = '''
    - -
    ''' # Add the device information manufacturer = (json_data['device']['manufacturer'] @@ -400,6 +410,8 @@ def generate_summary(self, json_data): mac = (json_data['device']['mac_addr'] if 'mac_addr' in json_data['device'] else 'Undefined') + summary += '
    ' + summary += self.generate_device_summary_label('Manufacturer', manufacturer) summary += self.generate_device_summary_label('Model', model) summary += self.generate_device_summary_label('Firmware', fw) @@ -407,6 +419,8 @@ def generate_summary(self, json_data): mac, trailing_space=False) + summary += '
    ' + # Add device configuration summary += '''
    @@ -531,6 +545,13 @@ def generate_css(self): unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } + @font-face { + font-family: 'Roboto Mono'; + font-style: normal; + src: url(https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + } + /* Define some common body formatting*/ body { font-family: 'Google Sans', sans-serif; @@ -593,6 +614,85 @@ def generate_css(self): margin-top: 0; } + .module-summary { + background-color: #F8F9FA; + width: 100%; + margin-bottom: 25px; + margin-top: 25px; + } + + .module-summary thead tr th { + text-align: left; + padding-top: 15px; + padding-left: 15px; + font-weight: 500; + color: #5F6368; + font-size: 14px; + } + + .module-summary tbody tr td { + padding-bottom: 15px; + padding-left: 15px; + font-size: 24px; + } + + .module-data { + border: 1px solid #DADCE0; + border-radius: 3px; + border-spacing: 0; + } + + .module-data thead tr th { + text-align: left; + padding: 12px 25px; + color: #3C4043; + font-size: 14px; + font-weight: 700; + } + + .module-data tbody tr td { + text-align: left; + padding: 12px 25px; + color: #3C4043; + font-size: 14px; + font-weight: 400; + border-top: 1px solid #DADCE0; + font-family: 'Roboto Mono', monospace; + } + + .callout-container.info { + background-color: #e8f0fe; + } + + .callout-container.info .icon { + width: 22px; + height: 22px; + margin-right: 5px; + background-size: contain; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAABOCAYAAACKX/AgAAAABHNCSVQICAgIfAhkiAAACYVJREFUeF7tXGtsVEUUPi0t0NIHli5Uni1I5KVYiCgPtQV8BcSIBkVUjFI0GiNGhR9KiIEfIqIkRlSqRlBQAVEREx9AqwIqClV5imILCBT6gHZLW2gLnm+xZHM5d2fm7t1tN9kv2R+dO3fmzHfncV7TmNKTZ89RFNoMxGrXjFb0MRAlzHAiRAmLEmbIgGH16AyLEmbIgGH16AyLEmbIgGH1OMP6rlVvZH1518E62nO4jkrKz9CBstNU4W2kU6fP8q/J10+Hdm34F0udkuOol6cdZXnaUr+uCTSwZwLFxca4JotJQzHh1PS9dU307Y4q2rjTS0XFp6j2zFkTWS/UTWwbS9m9O9CYgck09spUSm7fxlE7Tl4KC2F/H6un/PVlVLC7mhoa3bXE4uNiKHdACk0f66E+Xdo74cDonZASdryqgV7/5jit23aCQm2xtuElOn5IR3rsps7UOTXeiASTyiEhDEvv3cJyWrG5nM40uDujVINrFxdLk0d1oody0ik5wf2l6jphW/+uoZnLD1FV7fmNWzVA6Xnzfh7MrOzYIY7mT+lOw/okSV04LnOVsI+3VNDLX5QSTkAdJPEJOLJfCg3JSvAtI08y/1LjKC3p/OFdWdNIZVX88zYQlve24lrastdLNXyS6gAn6bMTMmjS8E461bXquEJYQ9M5mv/5Ufrk50plpyBjzKAUyuETbljvJIrjTdsEjXxobP2nhgp3eWnDzmoCqSrcdU0azbz9UopvY9aX1G7QhFXz0ntq2UHazmpCIECfmnpDOt1/fTq1j3fHwKhjteT978tpGf+gvwXCUFZDXrm/J6UkBrevBUUYZtaj+SUBycJXnchf+JExHrrk/6UWaGBOnmGWLdlQRp/8VBlwOwBpb0zLDGqmBUXYvDVHAi7DjI7xtGhqL7q8a+j1IxC990gdzXjvIB3j/c4OWJ7PTexq91hZ7nhtfLS5IiBZV2Um0vIn+oSNLIwUZhP6HMx922E177Mrf6ywe6wsd0TYz3/V0MJ1pbaNTxh6CeXnZV047WwrhuAB7M63uW/IYIcFa0tp6/4au8cBy40Jg1I6a8Uh270Cgr4wqZvx6RdQSsOHOHkhgx1pUHtmLf+XMBZTGBP2TkG5rVKKpTA7iP0Bpx4Mcv8fypwCstgtz5OnGn3WiCmMNn1sphMW7BPNHWzw2D+alU5TQVB/xOzdZCUogT0TW+YOcNKc7x24jKa8tl88CGBGrZ3Z18j2NJphi78+LpIF1QGnYTBkOWZE8SL2tEUP9hT9Z6cbz9Jidg6YQJuwv0rrad32E2Lbd16bFtbTUBQiQCFOT8goYd32k7Sf3U+60CYsnxVDyUSEBj99tEe3vxarN50VZ8hqRRMPagn76nRxcQvCmzhNCtn5JwHmTqg0eKk/p2XYLh5gs0wCHJveer0TU4uwr36vEj2lEAK2YaQAskr7LLzA6/+o0hqGVhCkYJc8u8ZekeqaIQ1pgzkNdUaLExeeklVsc1qxgb0fdwyT9zn/usoZBgO7iP1QEnIGJEvFrboMbiUJRf+cslXGjQjbeaiW6hsuVh7h/Luarf9IA3xwkN0KKMsI+6lw8ZuWNxA3lDCqf0qLmj+STDplMJtG9JNnGbwdKigJO1Amu0qyMxNUbbfa50OzZG9GcdkZpcxKwko4Ii0BplCkwi4Mh+i7CspTEraYBE+K+4SNnbeXai2u5kTeb9Y/308SwXEZgi0S7MbqX1dJWHOeg7WDdJtOrfVM/gZZVuPb5H3duohMSVDFBfCOcklK+Q+IG6YlBRdMkAQOVxmUVymXxW5y+MulJOycEGKMiQk+XBUuctzuR0mYncFaWaNne7ktsBvtIcokOxLUq0aDMLmRco5GRyoQTZcgTQ5rPSVhcMBJKKuOYMJsPrbdWP3HryQskzP/JByz+UpS3dZWhjwNCchyVEFJWC+PrLMUlcgGuarD1vB8e7FsAmWmt1WKpySsfzfZBNq0x0vwZEQakMyyea/srrIbq/8YlYRd0T1R9HnBQ7mNXSKRBmT+SOlSyJtFsrEKSsJg3SPsL6GAnW6RBqRJScjO6iBGlqx1lYThhdHspZSwnjOiJV+ZVLc1lEFW5JRJGD1IdvlY62oRdsvgVNH3BQXwgx/Mo8dWIcL1N3LJpAQ8ZGLfyO52HWgRhuTaHHYYSljK4XaE3Vs7TvDHXfqd/HGRtq6bQKxFGMhAHrxksGIDXbJRP67XUsS+xXFVyRuBMeXx2HShTVjfjPY0boicQrT6x0rad1Q/eqwrnFv1/jxST2ts8m/Hc7bRZQYXIrQJg/C4NID1bgX0sRnvHRD3B2vdcP+NPWvG0gOiztg2PoYe5zGZwCh7Bw0v+rKUlvLmKQHqBxLpTDOjm9uC89CqCuPzIJ7oBFBS8/KL6Tcbq+TBHA89eWsXo6aNJXko12ObiQzB5n56xEgA/8ogBgqk/88pWWh3Lufg2pGVytnUuC1iCmPCkLY9/94ehLs9Etb+eoLmrDpM+LotBfQ9Z+VhWst3nCTgwsNLU3pon4z+bRgThpev7ZtET4/LkGTxlYE0LAVJ57F9yaUH6HMa921HFrp55rYMGnaZsys1jghDp7gANTFALgKWwn2c+RfO0xOnIbINf7fZsyD3nZx2fvcI51dpjDd9/4mge7HhruFpvhwyXJgKBaCUQhfExYZAHpQhbC++mdeCFxsweN2rM8hnmMqb7H3XuXd1BrYhzB1o8JJS6v9xQNarD7Tw1ZlmgfBVX/zsKK3ZenEakXVGIcSFNKlczqLBVRbTC1PY0H9ht1Lhbi/B+NfZJ7EMZ7WWy1n+hHy4qYIWsp6GNEgd4K72qP7JlM36WxcOriKajgBxc8wTkSkEWxA/KD3ZQEUldbRpT7Xoz5L6w2n49PgMumek8z3L2m5Qe5i1Mfz9E98SwcUHLFWngMpyjgOimryL3UDPgvpzDZ/obsJ1wiAcyHq3oIxW8IVTty/FqwYPc2fyiHR6ODdCrjD7DwjLCHnwX3K6ejCzRUUSnkOPHs/Ogcdu7szLWw7c6LSjqhOSGWbtFDn+SO0u5P3HbQsAzoAc9mflcVo5PCqhRlgIax4E0teRkb2R3cRQbJ26t3GjN5uT4nIHphC8wbrOPzfIDCth/gJjpu34t9b3r2SQ5YjEvfP/SqbJp1Mh3wVGOP6dDCLSCCgjRopQ2KAeicbqiBtkoY0WI8ytAYS7Hce2ZLgFbS39RQkz/BJRwqKEGTJgWD06w6KEGTJgWD06w6KEGTJgWP0/nqir/+GPk3oAAAAASUVORK5CYII='); + } + + .callout-container { + display: flex; + box-sizing: border-box; + height: auto; + min-height: 48px; + padding: 6px 24px; + border-radius: 8px; + align-items: center; + gap: 10px; + color: #3c4043; + font-size: 14px; + } + + .device-information { + padding-top: 0.2in; + padding-left: 0.3in; + background-color: #F8F9FA; + width: 250px; + height: 2.6in; + } + /* Define the summary related css elements*/ .summary-content { position: relative; @@ -600,6 +700,7 @@ def generate_css(self): height: var(--summary-height); margin-top: 19px; margin-bottom: 19px; + background-color: #E8EAED; } .summary-item-label { @@ -647,9 +748,9 @@ def generate_css(self): .summary-color-box { position: absolute; right: 0in; - top: .3in; + top: 0in; width: 2.6in; - height: 226px; + height: var(--summary-height); } .summary-box-compliant { @@ -666,7 +767,7 @@ def generate_css(self): color: #DADCE0; position: relative; top: 10px; - left: 10px; + left: 20px; font-weight: 500; } @@ -676,7 +777,7 @@ def generate_css(self): color: #ffffff; position: relative; top: 10px; - left: 10px; + left: 20px; } .result-list-title { @@ -760,57 +861,44 @@ def generate_css(self): height: 30px; width: 8.5in; bottom: 0in; + border-top: 1px solid #D3D3D3; } .footer-label { + color: #3C4043; position: absolute; - top: 20px; + top: 5px; font-size: 12px; } /*CSS for the markdown tables */ - .markdown-table{ + .markdown-table { border-collapse: collapse; margin-left: 20px; + background-color: #F8F9FA; } .markdown-table th, .markdown-table td { - border: 1px solid #dddddd; + border: none; text-align: left; padding: 8px; } - .markdown-header-h1{ - margin-left:20px; + .markdown-header-h1 { margin-top:20px; margin-bottom:20px; margin-right:0px; - font-size: 2em; - font-weight: bold; } - .markdown-header-h2{ - margin-left:20px; + .markdown-header-h2 { margin-top:20px; margin-bottom:20px; margin-right:0px; - font-size: 1.5em; - font-weight: bold; } - .markdown-header-h3{ - margin-left:20px; - margin-top:20px; - margin-bottom:24px; - margin-right:0px; - - font-size: 1.17em; - font-weight: bold; - } - - .module-page-content{ + .module-page-content { /*Page height minus header(93px), footer(30px), and a 20px bottom padding.*/ height: calc(11in - 93px - 30px - 20px); @@ -823,6 +911,10 @@ def generate_css(self): overflow: hidden; } + .module-page-content h1 { + font-size: 32px; + } + @media print { @page { size: Letter; diff --git a/framework/python/src/test_orc/test_orchestrator.py b/framework/python/src/test_orc/test_orchestrator.py index 560bc5f79..38f5e5267 100644 --- a/framework/python/src/test_orc/test_orchestrator.py +++ b/framework/python/src/test_orc/test_orchestrator.py @@ -452,16 +452,24 @@ def _run_test_module(self, module): f"Error occurred whilst obtaining results for module {module.name}") LOGGER.error(results_error) - # Get report from the module - report_file = f"{container_runtime_dir}/{module.name}_report.md" + # Get the markdown report from the module if generated + markdown_file = f"{container_runtime_dir}/{module.name}_report.md" try: - with open(report_file, "r", encoding="utf-8") as f: + with open(markdown_file, "r", encoding="utf-8") as f: module_report = f.read() self._session.add_module_report(module_report) - except (FileNotFoundError, PermissionError) as report_error: - LOGGER.error( - f"Error occurred whilst obtaining report for module {module.name}") - LOGGER.error(report_error) + except (FileNotFoundError, PermissionError): + LOGGER.debug("Test module did not produce a markdown module report") + + # Get the HTML report from the module if generated + html_file = f"{container_runtime_dir}/{module.name}_report.html" + try: + with open(html_file, "r", encoding="utf-8") as f: + module_report = f.read() + LOGGER.debug(f"Adding module report for module {module.name}") + self._session.add_module_report(module_report) + except (FileNotFoundError, PermissionError): + LOGGER.debug("Test module did not produce a html module report") LOGGER.info(f"Test module {module.name} has finished") @@ -516,8 +524,8 @@ def _load_test_modules(self): # Check if the directory protocol exists and move it to the beginning # protocol should always be run first so BACnet binding doesn't get # corrupted during DHCP changes in the conn module - if 'protocol' in module_dirs: - module_dirs.insert(0, module_dirs.pop(module_dirs.index('protocol'))) + if "protocol" in module_dirs: + module_dirs.insert(0, module_dirs.pop(module_dirs.index("protocol"))) for module_dir in module_dirs: diff --git a/modules/test/dns/python/src/dns_module.py b/modules/test/dns/python/src/dns_module.py index 2272c6859..02d89eb0a 100644 --- a/modules/test/dns/python/src/dns_module.py +++ b/modules/test/dns/python/src/dns_module.py @@ -18,7 +18,7 @@ import os LOG_NAME = 'test_dns' -MODULE_REPORT_FILE_NAME='dns_report.md' +MODULE_REPORT_FILE_NAME='dns_report.html' DNS_SERVER_CAPTURE_FILE = '/runtime/network/dns.pcap' STARTUP_CAPTURE_FILE = '/runtime/device/startup.pcap' MONITOR_CAPTURE_FILE = '/runtime/device/monitor.pcap' @@ -52,11 +52,15 @@ def generate_module_report(self): # Extract DNS data from the pcap file dns_table_data = self.extract_dns_data() + html_content = '

    DNS Module

    ' + # Set the summary variables local_requests = sum(1 for row in dns_table_data - if row['Destination'] == self._dns_server and row['Type'] == 'Query') + if row['Destination'] == + self._dns_server and row['Type'] == 'Query') external_requests = sum(1 for row in dns_table_data - if row['Destination'] != self._dns_server and row['Type'] == 'Query') + if row['Destination'] != + self._dns_server and row['Type'] == 'Query') total_requests = sum(1 for row in dns_table_data if row['Type'] == 'Query') @@ -64,48 +68,74 @@ def generate_module_report(self): total_responses = sum(1 for row in dns_table_data if row['Type'] == 'Response') - summary = '## Summary' - summary += f'''\n- Requests to local DNS server: {local_requests}''' - summary += f'''\n- Requests to external DNS servers: {external_requests}''' - summary += f'''\n- Total DNS requests: {total_requests}''' - summary += f'''\n- Total DNS responses: {total_responses}''' + # Add summary table + html_content += (f''' +

    + + + + + + + + + + + + + + + +
    Requests to local DNS serverRequests to external DNS serversTotal DNS requestsTotal DNS responses
    {local_requests}{external_requests}{total_requests}{total_responses}
    + ''') if (total_requests + total_responses) > 0: - # Find the maximum length of 'Destination' values - max_data_length = max(len(row['Data']) for row in dns_table_data) if len(dns_table_data)>0 else 8 + table_content = ''' + + + + + + + + + + ''' - table_content = '' for row in dns_table_data: - table_content += (f'''| {row['Source']: ^12} ''' - f'''| {row['Destination']: ^13} ''' - f'''| {row['Type']: ^9} ''' - f'''| {row['Data']: ^{max_data_length}} |\n''') + table_content += (f''' + + + + + + ''') - header = (f'''| {'Source': ^12} ''' - f'''| {'Destination': ^{13}} ''' - f'''| {'Type': ^{9}} ''' - f'''| {'Data': ^{max_data_length}} |''') - header_line = (f'''|{'-' * 14}|{'-' * 15}|{'-' * 11}|''' - f'''{'-' * (max_data_length + 2)}''') + table_content += ''' + +
    SourceDestinationTypeURL
    {row['Source']}{row['Destination']}{row['Type']}{row['Data']}
    + ''' - markdown_template = (f'''# DNS Module\n''' - f'''\n{header}\n{header_line}\n{table_content}\n{summary}''') + html_content += table_content else: - markdown_template = (f'''# DNS Module\n''' - f'''\n- No DNS traffic detected\n''' - f'''\n{summary}''') - LOGGER.debug('Markdown Report:\n' + markdown_template) + html_content += (''' +
    +
    + No DNS traffic detected from the device +
    ''') + + LOGGER.debug('Module report:\n' + html_content) # Use os.path.join to create the complete file path report_path = os.path.join(self._results_dir, MODULE_REPORT_FILE_NAME) - # Write the content to a file + # Write the content to a file with open(report_path, 'w', encoding='utf-8') as file: - file.write(markdown_template) + file.write(html_content) - LOGGER.info('Module report generated at: ' + str(report_path)) + LOGGER.info('Module report generated at: ' + str(report_path)) return report_path diff --git a/modules/test/nmap/python/src/nmap_module.py b/modules/test/nmap/python/src/nmap_module.py index 2bd0d3a5b..06613c023 100644 --- a/modules/test/nmap/python/src/nmap_module.py +++ b/modules/test/nmap/python/src/nmap_module.py @@ -21,7 +21,7 @@ import os LOG_NAME = 'test_nmap' -MODULE_REPORT_FILE_NAME = 'nmap_report.md' +MODULE_REPORT_FILE_NAME = 'nmap_report.html' NMAP_SCAN_RESULTS_SCAN_FILE = 'nmap_scan_results.json' LOGGER = None @@ -83,52 +83,74 @@ def generate_module_report(self): else: udp_open += 1 - summary = '## Summary' - summary += f'''\n- TCP Ports Open: {tcp_open}''' - summary += f'''\n- UDP Ports Open: {udp_open}''' - summary += f'''\n- Total Ports Open: {tcp_open + udp_open}''' + html_content = '

    Services Module

    ' + + # Add summary table + html_content += (f''' + + + + + + + + + + + + + + +
    TCP ports openUDP ports openTotal ports open
    {tcp_open}{udp_open}{tcp_open + udp_open}
    + ''') + + if (tcp_open + udp_open) > 0: + + table_content = ''' + + + + + + + + + + ''' - if (tcp_open + udp_open)>0: + for row in nmap_table_data: - # Find the maximum column lengths - max_service_length = max( - len(row['Service']) - for row in nmap_table_data) if len(nmap_table_data) > 0 else 15 - max_version_length = max( - len(row['Version']) - for row in nmap_table_data) if len(nmap_table_data) > 0 else 15 + table_content += (f''' + + + + + + ''') - table_content = '' - for row in nmap_table_data: - table_content += (f'''| {row['Port']: ^10} | {row['Type']: ^10} ''' - f'''| {row['State']: ^10} ''' - f'''| {row['Service']: ^{max_service_length}} ''' - f'''| {row['Version']: ^{max_version_length}} |\n''') - - # Dynamically adjust the header width based on the - # longest 'Destination' content - header = (f'''| {'Port': ^10} | {'Type': ^{10}} | {'State': ^{10}} ''' - f'''| {'Service': ^{max_service_length}} ''' - f'''| {'Version': ^{max_version_length}} |''') - header_line = (f'''|{'-' * 12}|{'-' * 12}|{'-' * 12}|''' - f'''{'-' * (max_service_length + 2)}''' - f'''|{'-' * (max_version_length + 2)}|''') - - markdown_template = (f'''# NMAP Module\n''' - f'''\n{header}\n{header_line}\n{table_content}\n{summary}''') + table_content += ''' + +
    PortStateServiceVersion
    {row['Port']}/{row['Type']}{row['State']}{row['Service']}{row['Version']}
    + ''' + + html_content += table_content else: - markdown_template = (f'''# NMAP Module\n''' - f'''\n- No ports detected open\n''' - f'''\n{summary}''') - LOGGER.debug('Markdown Report:\n' + markdown_template) + + html_content += (''' +
    +
    + No open ports detected +
    ''') + + LOGGER.debug('Module report:\n' + html_content) # Use os.path.join to create the complete file path report_path = os.path.join(self._results_dir, MODULE_REPORT_FILE_NAME) # Write the content to a file with open(report_path, 'w', encoding='utf-8') as file: - file.write(markdown_template) + file.write(html_content) LOGGER.info('Module report generated at: ' + str(report_path)) diff --git a/modules/test/ntp/python/src/ntp_module.py b/modules/test/ntp/python/src/ntp_module.py index cfd867165..952ae236f 100644 --- a/modules/test/ntp/python/src/ntp_module.py +++ b/modules/test/ntp/python/src/ntp_module.py @@ -18,7 +18,7 @@ import os LOG_NAME = 'test_ntp' -MODULE_REPORT_FILE_NAME = 'ntp_report.md' +MODULE_REPORT_FILE_NAME = 'ntp_report.html' NTP_SERVER_CAPTURE_FILE = '/runtime/network/ntp.pcap' STARTUP_CAPTURE_FILE = '/runtime/device/startup.pcap' MONITOR_CAPTURE_FILE = '/runtime/device/monitor.pcap' @@ -54,23 +54,7 @@ def generate_module_report(self): # Extract NTP data from the pcap file ntp_table_data = self.extract_ntp_data() - table_content = '' - for row in ntp_table_data: - # Timestamp of the NTP packet - dt_object = datetime.utcfromtimestamp(row['Timestamp']) - - # Extract milliseconds from the fractional part of the timestamp - milliseconds = int((row['Timestamp'] % 1) * 1000) - - # Format the datetime object with milliseconds - formatted_time = dt_object.strftime( - '%b %d, %Y %H:%M:%S.') + f'{milliseconds:03d}' - - table_content += (f'''| {row['Source']: ^17} ''' - f'''| {row['Destination']: ^17} ''' - f'''| {row['Type']: ^8} ''' - f'''| {row['Version']: ^9} ''' - f'''| {formatted_time: ^{27}} |\n''') + html_content = '

    NTP Module

    ' # Set the summary variables local_requests = sum( @@ -85,40 +69,86 @@ def generate_module_report(self): total_responses = sum(1 for row in ntp_table_data if row['Type'] == 'Server') - summary = '## Summary' - summary += f'''\n- Requests to local NTP servers: {local_requests}''' - summary += f'''\n- Requests to external NTP servers: {external_requests}''' - summary += f'''\n- Total NTP requests: {total_requests}''' - summary += f'''\n- Total NTP responses: {total_responses}''' + # Add summary table + html_content += (f''' + + + + + + + + + + + + + + + + + +
    Requests to local NTP serverRequests to external NTP serversTotal NTP requestsTotal NTP responses
    {local_requests}{external_requests}{total_requests}{total_responses}
    + ''') if total_requests + total_responses > 0: - header = (f'''| {'Source': ^17} ''' - f'''| {'Destination': ^17} ''' - f'''| {'Type': ^8} ''' - f'''| {'Version': ^9} ''' - f'''| {'Timestamp': ^27} |''') - header_line = (f'''|{'-' * 19}|{'-' * 19}|{'-' * 10}''' - f'''|{'-' * 11}''' - f'''|{'-' * 29}|''') - - markdown_template = ( - f'''# NTP Module\n''' - f'''\n{header}\n{header_line}\n{table_content}\n{summary}''') + table_content = ''' + + + + + + + + + + + ''' + + for row in ntp_table_data: + + # Timestamp of the NTP packet + dt_object = datetime.utcfromtimestamp(row['Timestamp']) + + # Extract milliseconds from the fractional part of the timestamp + milliseconds = int((row['Timestamp'] % 1) * 1000) + + # Format the datetime object with milliseconds + formatted_time = dt_object.strftime( + '%b %d, %Y %H:%M:%S.') + f'{milliseconds:03d}' + + table_content += (f''' + + + + + + + ''') + + table_content += ''' + +
    SourceDestinationTypeVersionTimestamp
    {row['Source']}{row['Destination']}{row['Type']}{row['Version']}{formatted_time}
    + ''' + + html_content += table_content else: - markdown_template = (f'''# NTP Module\n''' - f'''\n- No NTP traffic detected\n''' - f'''\n{summary}''') + html_content += (''' +
    +
    + No NTP traffic detected from the device +
    ''') - LOGGER.debug('Markdown Report:\n' + markdown_template) + LOGGER.debug('Module report:\n' + html_content) # Use os.path.join to create the complete file path report_path = os.path.join(self._results_dir, MODULE_REPORT_FILE_NAME) # Write the content to a file with open(report_path, 'w', encoding='utf-8') as file: - file.write(markdown_template) + file.write(html_content) LOGGER.info('Module report generated at: ' + str(report_path)) diff --git a/modules/test/tls/python/src/run.py b/modules/test/tls/python/src/run.py index 2b7ea7e0f..89de9f65e 100644 --- a/modules/test/tls/python/src/run.py +++ b/modules/test/tls/python/src/run.py @@ -37,7 +37,7 @@ def __init__(self, module): self._test_module = TLSModule(module) self._test_module.run_tests() - self._test_module.generate_module_report() + #self._test_module.generate_module_report() def _handler(self, signum): LOGGER.debug('SigtermEnum: ' + str(signal.SIGTERM)) diff --git a/modules/test/tls/python/src/tls_module.py b/modules/test/tls/python/src/tls_module.py index 25741c07e..64986dee1 100644 --- a/modules/test/tls/python/src/tls_module.py +++ b/modules/test/tls/python/src/tls_module.py @@ -22,7 +22,7 @@ from cryptography.hazmat.primitives.asymmetric import rsa, dsa, ec LOG_NAME = 'test_tls' -MODULE_REPORT_FILE_NAME = 'tls_report.md' +#MODULE_REPORT_FILE_NAME = 'tls_report.html' STARTUP_CAPTURE_FILE = '/runtime/device/startup.pcap' MONITOR_CAPTURE_FILE = '/runtime/device/monitor.pcap' TLS_CAPTURE_FILE = '/runtime/output/tls.pcap' @@ -53,22 +53,9 @@ def __init__(self, LOGGER = self._get_logger() self._tls_util = TLSUtil(LOGGER) - def generate_module_report(self): - summary = '## Summary' - - summary_header = (f'''| {'#': ^5} ''' - f'''| {'Expiry': ^{25}} ''' - f'''| {'Length': ^{8}} ''' - f'''| {'Type': ^{6}} ''' - f'''| {'Port No.': ^{10}} ''' - f'''| {'Signed by': ^{11}} | ''') - summary_header_line = (f'''|{'-' * 7}''' - f'''|{'-' * 27}''' - f'''|{'-' * 10}''' - f'''|{'-' * 8}''' - f'''|{'-' * 12}''' - f'''|{'-' * 13}|''') - summary_table = f'{summary_header}\n{summary_header_line}' + # def generate_module_report(self): + + html_content = '

    TLS Module

    ' # List of capture files to scan pcap_files = [ @@ -77,9 +64,40 @@ def generate_module_report(self): ] certificates = self.extract_certificates_from_pcap(pcap_files, self._device_mac) - if len(certificates)>0: + if len(certificates) > 0: + + # Add summary table + summary_table = ''' + + + + + + + + + + + + ''' + + # table_content = ''' + #
    ExpiryLengthTypePort numberSigned by
    + # + # + # + # + # + # + # + # + # + # ''' + cert_tables = [] - for cert_num, ((ip_address, port), cert) in enumerate(certificates.items()): + for cert_num, ((ip_address, port), cert) in enumerate( + certificates.items()): + # Extract certificate data not_valid_before = cert.not_valid_before not_valid_after = cert.not_valid_after @@ -90,22 +108,24 @@ def generate_module_report(self): public_key = cert.public_key() signed_by = 'None' if isinstance(public_key, rsa.RSAPublicKey): - public_key_type = "RSA" + public_key_type = 'RSA' elif isinstance(public_key, dsa.DSAPublicKey): - public_key_type = "DSA" + public_key_type = 'DSA' elif isinstance(public_key, ec.EllipticCurvePublicKey): - public_key_type = "EC" + public_key_type = 'EC' else: - public_key_type = "Unknown" + public_key_type = 'Unknown' # Calculate certificate length - cert_length = len(cert.public_bytes(encoding=serialization.Encoding.DER)) + cert_length = len(cert.public_bytes( + encoding=serialization.Encoding.DER)) + # Generate the Certificate table - cert_table = (f'| Property | Value |\n' - f'|---|---|\n' - f"| {'Version':<17} | {version_value:^25} |\n" - f"| {'Signature Alg.':<17} | {signature_alg_value:^25} |\n" - f"| {'Validity from':<17} | {not_before:^25} |\n" - f"| {'Valid to':<17} | {not_after:^25} |") + # cert_table = (f'| Property | Value |\n' + # f'|---|---|\n' + # f"| {'Version':<17} | {version_value:^25} |\n" + # f"| {'Signature Alg.':<17} | {signature_alg_value:^25} |\n" + # f"| {'Validity from':<17} | {not_before:^25} |\n" + # f"| {'Valid to':<17} | {not_after:^25} |") # Generate the Subject table subj_table = ('| Distinguished Name | Value |\n' @@ -124,45 +144,52 @@ def generate_module_report(self): signed_by = dn[1] ext_table = None - if cert.extensions: - ext_table = ('| Extension | Value |\n' - '|---|---|') - for extension in cert.extensions: - for extension_value in extension.value: - ext_table += f'\n| {extension.oid._name} | {extension_value.value}' # pylint: disable=W0212 - cert_table = f'### Certificate\n{cert_table}' - cert_table += f'\n\n### Subject\n{subj_table}' - cert_table += f'\n\n### Issuer\n{iss_table}' - if ext_table is not None: - cert_table += f'\n\n### Extensions\n{ext_table}' - cert_tables.append(cert_table) - summary_table_row = (f'''| {cert_num+1: ^5} ''' - f'''| {not_after: ^25} ''' - f'''| {cert_length: ^8} ''' - f'''| {public_key_type: ^6} ''' - f'''| {port: ^10} ''' - f'''| {signed_by: ^11} |''') - summary_table+=f'\n{summary_table_row}' - - markdown_template = '# TLS Module\n' + '\n'.join( - '\n' + tables for tables in cert_tables) - - # summary = f'## Summary\n\n{summary_table}' - # markdown_template += f'\n\n{summary}' + # if cert.extensions: + # ext_table = ('| Extension | Value |\n' + # '|---|---|') + # for extension in cert.extensions: + # for extension_value in extension.value: + # ext_table += f'''\n| {extension.oid._name} | + # {extension_value.value}''' # pylint: disable=W0212 + # cert_table = f'### Certificate\n{cert_table}' + # cert_table += f'\n\n### Subject\n{subj_table}' + # cert_table += f'\n\n### Issuer\n{iss_table}' + # if ext_table is not None: + # cert_table += f'\n\n### Extensions\n{ext_table}' + # cert_tables.append(cert_table) + + summary_table += f''' + + + + + + + + ''' + + summary_table += ''' + +
    ExpiryLengthTypePort numberSigned by
    {not_after}{cert_length}{public_key_type}{port}{signed_by}
    + ''' + + html_content += summary_table + else: - markdown_template = (f'''# TLS Module\n''' - f'''\n- No device certificates detected\n''') - - summary = f'## Summary\n\n{summary_table}' - markdown_template += f'\n\n{summary}' - LOGGER.debug('Markdown Report:\n' + markdown_template) + html_content += (''' +
    +
    + No TLS certificates found on the device +
    ''') + + LOGGER.debug('Module report:\n' + html_content) # Use os.path.join to create the complete file path report_path = os.path.join(self._results_dir, MODULE_REPORT_FILE_NAME) # Write the content to a file with open(report_path, 'w', encoding='utf-8') as file: - file.write(markdown_template) + file.write(html_content) LOGGER.info('Module report generated at: ' + str(report_path)) return report_path diff --git a/testing/unit/dns/dns_module_test.py b/testing/unit/dns/dns_module_test.py index ad9c89e02..52ec80b4d 100644 --- a/testing/unit/dns/dns_module_test.py +++ b/testing/unit/dns/dns_module_test.py @@ -16,6 +16,7 @@ import unittest from scapy.all import rdpcap, DNS, wrpcap import os +from testreport import TestReport MODULE = 'dns' @@ -25,8 +26,8 @@ REPORTS_DIR = os.path.join(TEST_FILES_DIR,'reports/') CAPTURES_DIR = os.path.join(TEST_FILES_DIR,'captures/') -LOCAL_REPORT = os.path.join(REPORTS_DIR,'dns_report_local.md') -LOCAL_REPORT_NO_DNS = os.path.join(REPORTS_DIR,'dns_report_local_no_dns.md') +LOCAL_REPORT = os.path.join(REPORTS_DIR,'dns_report_local.html') +LOCAL_REPORT_NO_DNS = os.path.join(REPORTS_DIR,'dns_report_local_no_dns.html') CONF_FILE = 'modules/test/' + MODULE + '/conf/module_config.json' # Define the capture files to be used for the test @@ -41,7 +42,6 @@ class TLSModuleTest(unittest.TestCase): def setUpClass(cls): # Create the output directories and ignore errors if it already exists os.makedirs(OUTPUT_DIR, exist_ok=True) - # os.makedirs(TEMP_DIR, exist_ok=True) # Test the module report generation def dns_module_report_test(self): @@ -58,6 +58,12 @@ def dns_module_report_test(self): # Read the generated report with open(report_out_path, 'r', encoding='utf-8') as file: report_out = file.read() + formatted_report = self.add_formatting(report_out) + + # Write back the new formatted_report value + out_report_path = os.path.join(OUTPUT_DIR,'dns_report_with_dns.html') + with open(out_report_path, 'w', encoding='utf-8') as file: + file.write(formatted_report) # Read the local good report with open(LOCAL_REPORT, 'r', encoding='utf-8') as file: @@ -108,6 +114,12 @@ def dns_module_report_no_dns_test(self): # Read the generated report with open(report_out_path, 'r', encoding='utf-8') as file: report_out = file.read() + formatted_report = self.add_formatting(report_out) + + # Write back the new formatted_report value + out_report_path = os.path.join(OUTPUT_DIR,'dns_report_no_dns.html') + with open(out_report_path, 'w', encoding='utf-8') as file: + file.write(formatted_report) # Read the local good report with open(LOCAL_REPORT_NO_DNS, 'r', encoding='utf-8') as file: @@ -116,6 +128,16 @@ def dns_module_report_no_dns_test(self): self.assertEqual(report_out, report_local) + def add_formatting(self,body): + return f''' + + + {TestReport().generate_head()} + + {body} + + DNS Module
    Requests to local DNS server Requests to external DNS servers Total DNS requests Total DNS responses
    71 6 77 91
    Source Destination Type URL
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 8.8.8.8 Query mqtt.googleapis.com
    10.10.10.4 8.8.8.8 Query mqtt.googleapis.com
    8.8.8.8 10.10.10.4 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    8.8.8.8 10.10.10.4 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query pool.ntp.org
    10.10.10.14 10.10.10.4 Query pool.ntp.org
    10.10.10.4 8.8.8.8 Query pool.ntp.org
    10.10.10.4 8.8.8.8 Query pool.ntp.org
    8.8.8.8 10.10.10.4 Response pool.ntp.org
    10.10.10.4 10.10.10.14 Response pool.ntp.org
    8.8.8.8 10.10.10.4 Response pool.ntp.org
    10.10.10.4 10.10.10.14 Response pool.ntp.org
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query pool.ntp.org
    10.10.10.14 10.10.10.4 Query pool.ntp.org
    10.10.10.4 8.8.8.8 Query pool.ntp.org
    10.10.10.4 10.10.10.14 Response pool.ntp.org
    10.10.10.4 10.10.10.14 Response pool.ntp.org
    8.8.8.8 10.10.10.4 Response pool.ntp.org
    10.10.10.4 8.8.8.8 Response pool.ntp.org
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 8.8.8.8 Query mqtt.googleapis.com
    8.8.8.8 10.10.10.4 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query pool.ntp.org
    10.10.10.14 10.10.10.4 Query pool.ntp.org
    10.10.10.4 10.10.10.14 Response pool.ntp.org
    10.10.10.4 10.10.10.14 Response pool.ntp.org
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query pool.ntp.org
    10.10.10.4 10.10.10.14 Response pool.ntp.org
    10.10.10.4 10.10.10.14 Response pool.ntp.org
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.14 10.10.10.4 Query mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    10.10.10.4 10.10.10.14 Response mqtt.googleapis.com
    \ No newline at end of file diff --git a/testing/unit/dns/reports/dns_report_local.md b/testing/unit/dns/reports/dns_report_local.md deleted file mode 100644 index 423745d73..000000000 --- a/testing/unit/dns/reports/dns_report_local.md +++ /dev/null @@ -1 +0,0 @@ -# DNS Module | Source | Destination | Type | Data | |--------------|---------------|-----------|--------------------- | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 8.8.8.8 | Query | mqtt.googleapis.com | | 10.10.10.4 | 8.8.8.8 | Query | mqtt.googleapis.com | | 8.8.8.8 | 10.10.10.4 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 8.8.8.8 | 10.10.10.4 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | pool.ntp.org | | 10.10.10.14 | 10.10.10.4 | Query | pool.ntp.org | | 10.10.10.4 | 8.8.8.8 | Query | pool.ntp.org | | 10.10.10.4 | 8.8.8.8 | Query | pool.ntp.org | | 8.8.8.8 | 10.10.10.4 | Response | pool.ntp.org | | 10.10.10.4 | 10.10.10.14 | Response | pool.ntp.org | | 8.8.8.8 | 10.10.10.4 | Response | pool.ntp.org | | 10.10.10.4 | 10.10.10.14 | Response | pool.ntp.org | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | pool.ntp.org | | 10.10.10.14 | 10.10.10.4 | Query | pool.ntp.org | | 10.10.10.4 | 8.8.8.8 | Query | pool.ntp.org | | 10.10.10.4 | 10.10.10.14 | Response | pool.ntp.org | | 10.10.10.4 | 10.10.10.14 | Response | pool.ntp.org | | 8.8.8.8 | 10.10.10.4 | Response | pool.ntp.org | | 10.10.10.4 | 8.8.8.8 | Response | pool.ntp.org | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 8.8.8.8 | Query | mqtt.googleapis.com | | 8.8.8.8 | 10.10.10.4 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | pool.ntp.org | | 10.10.10.14 | 10.10.10.4 | Query | pool.ntp.org | | 10.10.10.4 | 10.10.10.14 | Response | pool.ntp.org | | 10.10.10.4 | 10.10.10.14 | Response | pool.ntp.org | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | pool.ntp.org | | 10.10.10.4 | 10.10.10.14 | Response | pool.ntp.org | | 10.10.10.4 | 10.10.10.14 | Response | pool.ntp.org | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.14 | 10.10.10.4 | Query | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | | 10.10.10.4 | 10.10.10.14 | Response | mqtt.googleapis.com | ## Summary - Requests to local DNS server: 71 - Requests to external DNS servers: 6 - Total DNS requests: 77 - Total DNS responses: 91 \ No newline at end of file diff --git a/testing/unit/dns/reports/dns_report_local_no_dns.html b/testing/unit/dns/reports/dns_report_local_no_dns.html new file mode 100644 index 000000000..20f3f7511 --- /dev/null +++ b/testing/unit/dns/reports/dns_report_local_no_dns.html @@ -0,0 +1,23 @@ +

    DNS Module

    + + + + + + + + + + + + + + + + +
    Requests to local DNS serverRequests to external DNS serversTotal DNS requestsTotal DNS responses
    0000
    + +
    +
    + No DNS traffic detected from the device +
    \ No newline at end of file diff --git a/testing/unit/dns/reports/dns_report_local_no_dns.md b/testing/unit/dns/reports/dns_report_local_no_dns.md deleted file mode 100644 index b07302289..000000000 --- a/testing/unit/dns/reports/dns_report_local_no_dns.md +++ /dev/null @@ -1,9 +0,0 @@ -# DNS Module - -- No DNS traffic detected - -## Summary -- Requests to local DNS server: 0 -- Requests to external DNS servers: 0 -- Total DNS requests: 0 -- Total DNS responses: 0 \ No newline at end of file diff --git a/testing/unit/nmap/nmap_module_test.py b/testing/unit/nmap/nmap_module_test.py index 8fa42738f..73fff3a54 100644 --- a/testing/unit/nmap/nmap_module_test.py +++ b/testing/unit/nmap/nmap_module_test.py @@ -16,6 +16,7 @@ import unittest import os import shutil +from testreport import TestReport MODULE = 'nmap' @@ -25,7 +26,8 @@ REPORTS_DIR = os.path.join(TEST_FILES_DIR,'reports/') RESULTS_DIR = os.path.join(TEST_FILES_DIR,'results/') -LOCAL_REPORT = os.path.join(REPORTS_DIR,'nmap_report_local.md') +LOCAL_REPORT = os.path.join(REPORTS_DIR,'nmap_report_local.html') +LOCAL_REPORT_ALL_CLOSED = os.path.join(REPORTS_DIR,'nmap_report_all_closed_local.html') CONF_FILE = 'modules/test/' + MODULE + '/conf/module_config.json' @@ -56,11 +58,15 @@ def nmap_module_ports_open_report_test(self): # Read the generated report with open(report_out_path, 'r', encoding='utf-8') as file: report_out = file.read() + formatted_report = self.add_formatting(report_out) - # Read the local good report + # Write back the new formatted_report value + out_report_path = os.path.join(OUTPUT_DIR,'nmap_report_ports_open.html') + with open(out_report_path, 'w', encoding='utf-8') as file: + file.write(formatted_report) - local_report = os.path.join(REPORTS_DIR,'ports_open_report.md') - with open(local_report, 'r', encoding='utf-8') as file: + # Read the local good report + with open(LOCAL_REPORT, 'r', encoding='utf-8') as file: report_local = file.read() self.assertEqual(report_out, report_local) @@ -83,14 +89,29 @@ def nmap_module_report_all_closed_test(self): # Read the generated report with open(report_out_path, 'r', encoding='utf-8') as file: report_out = file.read() + formatted_report = self.add_formatting(report_out) + + # Write back the new formatted_report value + out_report_path = os.path.join(OUTPUT_DIR,'nmap_report_all_closed.html') + with open(out_report_path, 'w', encoding='utf-8') as file: + file.write(formatted_report) # Read the local good report - local_report = os.path.join(REPORTS_DIR,'all_closed_report.md') - with open(local_report, 'r', encoding='utf-8') as file: + with open(LOCAL_REPORT_ALL_CLOSED, 'r', encoding='utf-8') as file: report_local = file.read() self.assertEqual(report_out, report_local) + def add_formatting(self,body): + return f''' + + + {TestReport().generate_head()} + + {body} + + Services Module + + + + + + + + + + + + + + +
    TCP ports openUDP ports openTotal ports open
    000
    + +
    +
    + No open ports detected +
    \ No newline at end of file diff --git a/testing/unit/nmap/reports/nmap_report_local.html b/testing/unit/nmap/reports/nmap_report_local.html new file mode 100644 index 000000000..c27973a2c --- /dev/null +++ b/testing/unit/nmap/reports/nmap_report_local.html @@ -0,0 +1,48 @@ +

    Services Module

    + + + + + + + + + + + + + + +
    TCP ports openUDP ports openTotal ports open
    303
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PortStateServiceVersion
    22/tcpopenssh8.8 protocol 2.0
    443/tcpopenhttp
    502/tcpopenmbap
    + \ No newline at end of file diff --git a/testing/unit/nmap/reports/nmap_report_local.md b/testing/unit/nmap/reports/nmap_report_local.md deleted file mode 100644 index df7c216f1..000000000 --- a/testing/unit/nmap/reports/nmap_report_local.md +++ /dev/null @@ -1,12 +0,0 @@ -# NMAP Module - -| Port | Type | State | Service | Version | -|------------|------------|------------|------|------------------| -| 22 | tcp | open | ssh | 8.8 protocol 2.0 | -| 443 | tcp | open | http | | -| 502 | tcp | open | mbap | | - -## Summary -- TCP Ports Open: 3 -- UDP Ports Open: 0 -- Total Ports Open: 3 \ No newline at end of file diff --git a/testing/unit/nmap/reports/ports_open_report.md b/testing/unit/nmap/reports/ports_open_report.md deleted file mode 100644 index df7c216f1..000000000 --- a/testing/unit/nmap/reports/ports_open_report.md +++ /dev/null @@ -1,12 +0,0 @@ -# NMAP Module - -| Port | Type | State | Service | Version | -|------------|------------|------------|------|------------------| -| 22 | tcp | open | ssh | 8.8 protocol 2.0 | -| 443 | tcp | open | http | | -| 502 | tcp | open | mbap | | - -## Summary -- TCP Ports Open: 3 -- UDP Ports Open: 0 -- Total Ports Open: 3 \ No newline at end of file diff --git a/testing/unit/ntp/ntp_module_test.py b/testing/unit/ntp/ntp_module_test.py index 40eab9515..dec66f239 100644 --- a/testing/unit/ntp/ntp_module_test.py +++ b/testing/unit/ntp/ntp_module_test.py @@ -16,6 +16,7 @@ import unittest from scapy.all import rdpcap, NTP, wrpcap import os +from testreport import TestReport MODULE = 'ntp' @@ -25,8 +26,8 @@ REPORTS_DIR = os.path.join(TEST_FILES_DIR,'reports/') CAPTURES_DIR = os.path.join(TEST_FILES_DIR,'captures/') -LOCAL_REPORT = os.path.join(REPORTS_DIR,'ntp_report_local.md') -LOCAL_REPORT_NO_NTP = os.path.join(REPORTS_DIR,'ntp_report_local_no_ntp.md') +LOCAL_REPORT = os.path.join(REPORTS_DIR,'ntp_report_local.html') +LOCAL_REPORT_NO_NTP = os.path.join(REPORTS_DIR,'ntp_report_local_no_ntp.html') CONF_FILE = 'modules/test/' + MODULE + '/conf/module_config.json' # Define the capture files to be used for the test @@ -59,6 +60,12 @@ def ntp_module_report_test(self): # Read the generated report with open(report_out_path, 'r', encoding='utf-8') as file: report_out = file.read() + formatted_report = self.add_formatting(report_out) + + # Write back the new formatted_report value + out_report_path = os.path.join(OUTPUT_DIR,'ntp_report_with_ntp.html') + with open(out_report_path, 'w', encoding='utf-8') as file: + file.write(formatted_report) # Read the local good report with open(LOCAL_REPORT, 'r', encoding='utf-8') as file: @@ -109,6 +116,12 @@ def ntp_module_report_no_ntp_test(self): # Read the generated report with open(report_out_path, 'r', encoding='utf-8') as file: report_out = file.read() + formatted_report = self.add_formatting(report_out) + + # Write back the new formatted_report value + out_report_path = os.path.join(OUTPUT_DIR,'ntp_report_no_ntp.html') + with open(out_report_path, 'w', encoding='utf-8') as file: + file.write(formatted_report) # Read the local good report with open(LOCAL_REPORT_NO_NTP, 'r', encoding='utf-8') as file: @@ -116,6 +129,15 @@ def ntp_module_report_no_ntp_test(self): self.assertEqual(report_out, report_local) + def add_formatting(self,body): + return f''' + + + {TestReport().generate_head()} + + {body} + + NTP Module + + + + + + + + + + + + + + + + +
    Requests to local NTP serverRequests to external NTP serversTotal NTP requestsTotal NTP responses
    6338101104
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    SourceDestinationTypeVersionTimestamp
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:29.447
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:29.448
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:31.577
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:31.577
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:33.694
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:33.694
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:35.785
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:35.786
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:37.806
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:37.806
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:39.856
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:39.856
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:41.931
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:41.932
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:43.954
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:43.956
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:13:06.439
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:13:06.439
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:13:08.492
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:13:08.494
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:13:40.536
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:13:40.541
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:13:48.274
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:13:48.277
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:14:12.619
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:14:12.624
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:14:44.702
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:14:44.703
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:14:53.026
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:14:53.029
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:15:16.786
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:15:16.791
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:15:48.884
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:15:48.887
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:15:57.829
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:15:57.829
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:16:20.970
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:16:20.970
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:16:54.054
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:16:54.054
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:17:02.738
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:17:02.740
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:17:26.136
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:17:26.139
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:17:59.293
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:17:59.293
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:18:07.242
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:18:07.242
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:18:32.379
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:18:32.379
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:20:06.908
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:20:06.908
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:20:08.936
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:20:08.937
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:20:10.974
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:20:10.974
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:20:12.998
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:20:12.999
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:20:59.581
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:20:59.582
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:21:34.063
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:21:34.063
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:21:36.121
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:21:36.121
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:21:38.176
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:21:38.176
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:21:40.277
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:21:40.277
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:22:05.704
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:22:05.706
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:22:45.469
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:22:45.470
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:23:09.826
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:23:09.828
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:23:50.337
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:23:50.343
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:24:13.945
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:24:13.946
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:24:54.876
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:24:54.877
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:25:59.000
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:25:59.001
    10.10.10.15216.239.35.12Client4Feb 15, 2024 22:12:28.681
    216.239.35.1210.10.10.15Server4Feb 15, 2024 22:12:28.728
    10.10.10.15216.239.35.4Client4Feb 15, 2024 22:12:28.842
    216.239.35.410.10.10.15Server4Feb 15, 2024 22:12:28.888
    10.10.10.15216.239.35.8Client4Feb 15, 2024 22:12:29.042
    216.239.35.810.10.10.15Server4Feb 15, 2024 22:12:29.089
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:12:29.243
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:12:29.290
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:29.447
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:29.448
    10.10.10.15216.239.35.12Client4Feb 15, 2024 22:12:30.802
    216.239.35.1210.10.10.15Server4Feb 15, 2024 22:12:30.850
    10.10.10.15216.239.35.4Client4Feb 15, 2024 22:12:30.973
    216.239.35.410.10.10.15Server4Feb 15, 2024 22:12:31.032
    10.10.10.15216.239.35.8Client4Feb 15, 2024 22:12:31.173
    216.239.35.810.10.10.15Server4Feb 15, 2024 22:12:31.220
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:12:31.376
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:12:31.423
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:31.577
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:31.577
    10.10.10.15216.239.35.12Client4Feb 15, 2024 22:12:32.867
    216.239.35.1210.10.10.15Server4Feb 15, 2024 22:12:32.914
    10.10.10.15216.239.35.4Client4Feb 15, 2024 22:12:33.112
    216.239.35.410.10.10.15Server4Feb 15, 2024 22:12:33.159
    10.10.10.15216.239.35.8Client4Feb 15, 2024 22:12:33.271
    216.239.35.810.10.10.15Server4Feb 15, 2024 22:12:33.318
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:12:33.475
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:12:33.522
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:33.694
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:33.694
    10.10.10.15216.239.35.12Client4Feb 15, 2024 22:12:34.956
    216.239.35.1210.10.10.15Server4Feb 15, 2024 22:12:35.002
    10.10.10.15216.239.35.4Client4Feb 15, 2024 22:12:35.182
    216.239.35.410.10.10.15Server4Feb 15, 2024 22:12:35.228
    10.10.10.15216.239.35.8Client4Feb 15, 2024 22:12:35.398
    216.239.35.810.10.10.15Server4Feb 15, 2024 22:12:35.445
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:12:35.625
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:12:35.673
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:35.785
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:35.786
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:37.806
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:37.806
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:39.856
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:39.856
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:41.931
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:41.932
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:12:43.954
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:12:43.956
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:13:06.439
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:13:06.439
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:13:06.439
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:13:06.489
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:13:08.492
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:13:08.494
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:13:08.543
    10.10.10.15216.239.35.12Client4Feb 15, 2024 22:13:40.310
    216.239.35.1210.10.10.15Server4Feb 15, 2024 22:13:40.357
    10.10.10.15216.239.35.4Client4Feb 15, 2024 22:13:40.512
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:13:40.536
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:13:40.542
    216.239.35.410.10.10.15Server4Feb 15, 2024 22:13:40.574
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:13:40.583
    10.10.10.15216.239.35.8Client4Feb 15, 2024 22:13:40.714
    216.239.35.810.10.10.15Server4Feb 15, 2024 22:13:40.764
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:13:40.917
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:13:40.965
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:13:48.274
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:13:48.277
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:14:12.619
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:14:12.624
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:14:12.668
    10.10.10.15216.239.35.12Client4Feb 15, 2024 22:14:44.515
    216.239.35.1210.10.10.15Server4Feb 15, 2024 22:14:44.562
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:14:44.702
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:14:44.704
    10.10.10.15216.239.35.4Client4Feb 15, 2024 22:14:45.158
    216.239.35.410.10.10.15Server4Feb 15, 2024 22:14:45.219
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:14:45.359
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:14:45.406
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:14:45.707
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:14:45.755
    10.10.10.15216.239.35.8Client4Feb 15, 2024 22:14:45.980
    216.239.35.810.10.10.15Server4Feb 15, 2024 22:14:46.027
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:14:53.026
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:14:53.029
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:15:16.786
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:15:16.791
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:15:18.794
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:15:18.843
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:15:48.884
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:15:48.887
    10.10.10.15216.239.35.12Client4Feb 15, 2024 22:15:49.063
    216.239.35.1210.10.10.15Server4Feb 15, 2024 22:15:49.110
    10.10.10.15216.239.35.4Client4Feb 15, 2024 22:15:49.462
    216.239.35.410.10.10.15Server4Feb 15, 2024 22:15:49.509
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:15:50.127
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:15:50.175
    10.10.10.15216.239.35.8Client4Feb 15, 2024 22:15:51.107
    216.239.35.810.10.10.15Server4Feb 15, 2024 22:15:51.154
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:15:51.890
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:15:51.938
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:15:57.829
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:15:57.829
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:16:20.970
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:16:20.971
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:16:24.975
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:16:25.023
    10.10.10.15216.239.35.4Client4Feb 15, 2024 22:16:53.677
    216.239.35.410.10.10.15Server4Feb 15, 2024 22:16:53.739
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:16:54.054
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:16:54.054
    10.10.10.15216.239.35.12Client4Feb 15, 2024 22:16:54.276
    216.239.35.1210.10.10.15Server4Feb 15, 2024 22:16:54.322
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:16:54.593
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:16:54.648
    10.10.10.15216.239.35.8Client4Feb 15, 2024 22:16:55.435
    216.239.35.810.10.10.15Server4Feb 15, 2024 22:16:55.481
    10.10.10.15216.239.35.0Client4Feb 15, 2024 22:16:57.059
    216.239.35.010.10.10.15Server4Feb 15, 2024 22:16:57.107
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:17:02.738
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:17:02.740
    10.10.10.1510.10.10.5Client4Feb 15, 2024 22:17:26.136
    10.10.10.510.10.10.15Server4Feb 15, 2024 22:17:26.139
    + \ No newline at end of file diff --git a/testing/unit/ntp/reports/ntp_report_local.md b/testing/unit/ntp/reports/ntp_report_local.md deleted file mode 100644 index 40b19cf70..000000000 --- a/testing/unit/ntp/reports/ntp_report_local.md +++ /dev/null @@ -1,215 +0,0 @@ -# NTP Module - -| Source | Destination | Type | Version | Timestamp | -|-------------------|-------------------|----------|-----------|-----------------------------| -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:29.447 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:29.448 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:31.577 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:31.577 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:33.694 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:33.694 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:35.785 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:35.786 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:37.806 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:37.806 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:39.856 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:39.856 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:41.931 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:41.932 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:43.954 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:43.956 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:13:06.439 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:06.439 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:13:08.492 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:08.494 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:13:40.536 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:40.541 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:13:48.274 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:48.277 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:14:12.619 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:12.624 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:14:44.702 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:44.703 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:14:53.026 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:53.029 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:15:16.786 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:16.791 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:15:48.884 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:48.887 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:15:57.829 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:57.829 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:16:20.970 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:20.970 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:16:54.054 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:54.054 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:17:02.738 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:17:02.740 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:17:26.136 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:17:26.139 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:17:59.293 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:17:59.293 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:18:07.242 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:18:07.242 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:18:32.379 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:18:32.379 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:20:06.908 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:20:06.908 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:20:08.936 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:20:08.937 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:20:10.974 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:20:10.974 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:20:12.998 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:20:12.999 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:20:59.581 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:20:59.582 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:21:34.063 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:21:34.063 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:21:36.121 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:21:36.121 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:21:38.176 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:21:38.176 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:21:40.277 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:21:40.277 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:22:05.704 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:22:05.706 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:22:45.469 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:22:45.470 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:23:09.826 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:23:09.828 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:23:50.337 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:23:50.343 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:24:13.945 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:24:13.946 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:24:54.876 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:24:54.877 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:25:59.000 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:25:59.001 | -| 10.10.10.15 | 216.239.35.12 | Client | 4 | Feb 15, 2024 22:12:28.681 | -| 216.239.35.12 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:28.728 | -| 10.10.10.15 | 216.239.35.4 | Client | 4 | Feb 15, 2024 22:12:28.842 | -| 216.239.35.4 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:28.888 | -| 10.10.10.15 | 216.239.35.8 | Client | 4 | Feb 15, 2024 22:12:29.042 | -| 216.239.35.8 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:29.089 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:12:29.243 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:29.290 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:29.447 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:29.448 | -| 10.10.10.15 | 216.239.35.12 | Client | 4 | Feb 15, 2024 22:12:30.802 | -| 216.239.35.12 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:30.850 | -| 10.10.10.15 | 216.239.35.4 | Client | 4 | Feb 15, 2024 22:12:30.973 | -| 216.239.35.4 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:31.032 | -| 10.10.10.15 | 216.239.35.8 | Client | 4 | Feb 15, 2024 22:12:31.173 | -| 216.239.35.8 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:31.220 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:12:31.376 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:31.423 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:31.577 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:31.577 | -| 10.10.10.15 | 216.239.35.12 | Client | 4 | Feb 15, 2024 22:12:32.867 | -| 216.239.35.12 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:32.914 | -| 10.10.10.15 | 216.239.35.4 | Client | 4 | Feb 15, 2024 22:12:33.112 | -| 216.239.35.4 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:33.159 | -| 10.10.10.15 | 216.239.35.8 | Client | 4 | Feb 15, 2024 22:12:33.271 | -| 216.239.35.8 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:33.318 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:12:33.475 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:33.522 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:33.694 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:33.694 | -| 10.10.10.15 | 216.239.35.12 | Client | 4 | Feb 15, 2024 22:12:34.956 | -| 216.239.35.12 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:35.002 | -| 10.10.10.15 | 216.239.35.4 | Client | 4 | Feb 15, 2024 22:12:35.182 | -| 216.239.35.4 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:35.228 | -| 10.10.10.15 | 216.239.35.8 | Client | 4 | Feb 15, 2024 22:12:35.398 | -| 216.239.35.8 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:35.445 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:12:35.625 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:35.673 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:35.785 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:35.786 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:37.806 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:37.806 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:39.856 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:39.856 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:41.931 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:41.932 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:12:43.954 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:12:43.956 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:13:06.439 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:13:06.439 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:06.439 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:06.489 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:13:08.492 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:08.494 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:08.543 | -| 10.10.10.15 | 216.239.35.12 | Client | 4 | Feb 15, 2024 22:13:40.310 | -| 216.239.35.12 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:40.357 | -| 10.10.10.15 | 216.239.35.4 | Client | 4 | Feb 15, 2024 22:13:40.512 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:13:40.536 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:40.542 | -| 216.239.35.4 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:40.574 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:40.583 | -| 10.10.10.15 | 216.239.35.8 | Client | 4 | Feb 15, 2024 22:13:40.714 | -| 216.239.35.8 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:40.764 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:13:40.917 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:40.965 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:13:48.274 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:13:48.277 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:14:12.619 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:12.624 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:12.668 | -| 10.10.10.15 | 216.239.35.12 | Client | 4 | Feb 15, 2024 22:14:44.515 | -| 216.239.35.12 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:44.562 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:14:44.702 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:44.704 | -| 10.10.10.15 | 216.239.35.4 | Client | 4 | Feb 15, 2024 22:14:45.158 | -| 216.239.35.4 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:45.219 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:14:45.359 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:45.406 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:14:45.707 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:45.755 | -| 10.10.10.15 | 216.239.35.8 | Client | 4 | Feb 15, 2024 22:14:45.980 | -| 216.239.35.8 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:46.027 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:14:53.026 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:14:53.029 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:15:16.786 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:16.791 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:15:18.794 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:18.843 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:15:48.884 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:48.887 | -| 10.10.10.15 | 216.239.35.12 | Client | 4 | Feb 15, 2024 22:15:49.063 | -| 216.239.35.12 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:49.110 | -| 10.10.10.15 | 216.239.35.4 | Client | 4 | Feb 15, 2024 22:15:49.462 | -| 216.239.35.4 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:49.509 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:15:50.127 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:50.175 | -| 10.10.10.15 | 216.239.35.8 | Client | 4 | Feb 15, 2024 22:15:51.107 | -| 216.239.35.8 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:51.154 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:15:51.890 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:51.938 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:15:57.829 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:15:57.829 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:16:20.970 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:20.971 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:16:24.975 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:25.023 | -| 10.10.10.15 | 216.239.35.4 | Client | 4 | Feb 15, 2024 22:16:53.677 | -| 216.239.35.4 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:53.739 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:16:54.054 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:54.054 | -| 10.10.10.15 | 216.239.35.12 | Client | 4 | Feb 15, 2024 22:16:54.276 | -| 216.239.35.12 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:54.322 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:16:54.593 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:54.648 | -| 10.10.10.15 | 216.239.35.8 | Client | 4 | Feb 15, 2024 22:16:55.435 | -| 216.239.35.8 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:55.481 | -| 10.10.10.15 | 216.239.35.0 | Client | 4 | Feb 15, 2024 22:16:57.059 | -| 216.239.35.0 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:16:57.107 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:17:02.738 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:17:02.740 | -| 10.10.10.15 | 10.10.10.5 | Client | 4 | Feb 15, 2024 22:17:26.136 | -| 10.10.10.5 | 10.10.10.15 | Server | 4 | Feb 15, 2024 22:17:26.139 | - -## Summary -- Requests to local NTP servers: 63 -- Requests to external NTP servers: 38 -- Total NTP requests: 101 -- Total NTP responses: 104 \ No newline at end of file diff --git a/testing/unit/ntp/reports/ntp_report_local_no_ntp.html b/testing/unit/ntp/reports/ntp_report_local_no_ntp.html new file mode 100644 index 000000000..7df0fbd87 --- /dev/null +++ b/testing/unit/ntp/reports/ntp_report_local_no_ntp.html @@ -0,0 +1,23 @@ +

    NTP Module

    + + + + + + + + + + + + + + + + +
    Requests to local NTP serverRequests to external NTP serversTotal NTP requestsTotal NTP responses
    0000
    + +
    +
    + No NTP traffic detected from the device +
    \ No newline at end of file diff --git a/testing/unit/ntp/reports/ntp_report_local_no_ntp.md b/testing/unit/ntp/reports/ntp_report_local_no_ntp.md deleted file mode 100644 index fba008ed8..000000000 --- a/testing/unit/ntp/reports/ntp_report_local_no_ntp.md +++ /dev/null @@ -1,9 +0,0 @@ -# NTP Module - -- No NTP traffic detected - -## Summary -- Requests to local NTP servers: 0 -- Requests to external NTP servers: 0 -- Total NTP requests: 0 -- Total NTP responses: 0 \ No newline at end of file diff --git a/testing/unit/report/report_test.py b/testing/unit/report/report_test.py index b8bdcfba8..bef02a79a 100644 --- a/testing/unit/report/report_test.py +++ b/testing/unit/report/report_test.py @@ -59,7 +59,7 @@ def get_module_md_report(self, module): # Combine the path components using os.path.join report_file = os.path.join(UNIT_TEST_DIR, os.path.join(module, - os.path.join('reports',module+'_report_local.md'))) + os.path.join('reports',module+'_report_local.html'))) with open(report_file, 'r', encoding='utf-8') as file: report = file.read()