diff --git a/netutils/config/parser.py b/netutils/config/parser.py index 2681e551..0a444a53 100644 --- a/netutils/config/parser.py +++ b/netutils/config/parser.py @@ -223,7 +223,7 @@ def _build_banner(self, config_line: str) -> t.Optional[str]: line = "\n".join(banner_config) if line.endswith("^C"): banner, end, _ = line.rpartition("^C") - line = banner.rstrip() + end + line = banner + end self._update_config_lines(line) self._current_parents = self._current_parents[:-1] try: @@ -1303,7 +1303,7 @@ def _build_banner(self, config_line: str) -> t.Optional[str]: line = "\n".join(banner_config) if line.endswith(self.delimiter): banner, end, _ = line.rpartition(self.delimiter) - line = banner.rstrip() + end + line = banner + end self._update_config_lines(line) self._current_parents = self._current_parents[:-1] try: @@ -1474,7 +1474,7 @@ def _build_banner(self, config_line: str) -> t.Optional[str]: line = "\n".join(banner_config) if line.endswith("^C"): banner, end, _ = line.rpartition("^C") - line = banner.rstrip() + end + line = banner + end self._update_config_lines(line.strip()) self._current_parents = self._current_parents[:-1] try: @@ -1584,7 +1584,7 @@ def _build_banner(self, config_line: str) -> t.Optional[str]: line = "\n".join(banner_config) if line.endswith(self.banner_end): banner, end, _ = line.rpartition(self.banner_end) - line = banner.rstrip() + end + line = banner + end self._update_config_lines(line) self._current_parents = self._current_parents[:-1] try: @@ -1664,7 +1664,7 @@ def _build_banner(self, config_line: str) -> t.Optional[str]: line = "\n".join(banner_config) if line.endswith(self.delimiter): banner, end, _ = line.rpartition(self.delimiter) - line = banner.rstrip() + end + line = banner + end self._update_config_lines(line) self._current_parents = self._current_parents[:-1] try: diff --git a/tests/unit/mock/config/compliance/compliance/cisco_ios/ios_basic_received.json b/tests/unit/mock/config/compliance/compliance/cisco_ios/ios_basic_received.json index 03543450..a2f9d3fc 100644 --- a/tests/unit/mock/config/compliance/compliance/cisco_ios/ios_basic_received.json +++ b/tests/unit/mock/config/compliance/compliance/cisco_ios/ios_basic_received.json @@ -30,11 +30,11 @@ "unordered_compliant": true }, "banner": { - "actual": "banner login ^C\n******************\n TEST BANNER\n******************^C", + "actual": "banner login ^C\n******************\n TEST BANNER\n******************\n^C", "cannot_parse": true, "compliant": true, "extra": "", - "intended": "banner login ^C\n******************\n TEST BANNER\n******************^C", + "intended": "banner login ^C\n******************\n TEST BANNER\n******************\n^C", "missing": "", "ordered_compliant": true, "unordered_compliant": true diff --git a/tests/unit/mock/config/compliance/compliance/cisco_iosxr/iosxr_basic_received.json b/tests/unit/mock/config/compliance/compliance/cisco_iosxr/iosxr_basic_received.json index d590261b..7cfb94d2 100644 --- a/tests/unit/mock/config/compliance/compliance/cisco_iosxr/iosxr_basic_received.json +++ b/tests/unit/mock/config/compliance/compliance/cisco_iosxr/iosxr_basic_received.json @@ -1,10 +1,10 @@ { "banner": { - "actual": "banner exec ~\n****************\nNetwork to Code\nNew York City, New York\n****************~\nbanner motd ~\n*********************!!!IMPORTANT NOTICE!!!************************\n* This is a restricted system. All connections are logged. *\n* If you are not authorized to connect to this system, log *\n* off now. *\n* *\n* Violators will be prosecuted to the full extent of the law. *\n*******************************************************************\n* *\n**********************!!!AVIS IMPORTANT!!!*************************\n* L'acces au present systeme est limite et tous ses acces sont *\n* actuellement utilises. Si vous n'etes pas autorise a vous y *\n* raccorder, veuillez quitter ce systeme immediatement. *\n* *\n* Tout contrevenant sera poursuivi en vertu des mesures prevues *\n* par la loi. *\n*******************************************************************~", + "actual": "banner exec ~\n****************\nNetwork to Code\nNew York City, New York\n****************\n~\nbanner motd ~\n*********************!!!IMPORTANT NOTICE!!!************************\n* This is a restricted system. All connections are logged. *\n* If you are not authorized to connect to this system, log *\n* off now. *\n* *\n* Violators will be prosecuted to the full extent of the law. *\n*******************************************************************\n* *\n**********************!!!AVIS IMPORTANT!!!*************************\n* L'acces au present systeme est limite et tous ses acces sont *\n* actuellement utilises. Si vous n'etes pas autorise a vous y *\n* raccorder, veuillez quitter ce systeme immediatement. *\n* *\n* Tout contrevenant sera poursuivi en vertu des mesures prevues *\n* par la loi. *\n*******************************************************************\n~", "cannot_parse": true, "compliant": true, "extra": "", - "intended": "banner exec ~\n****************\nNetwork to Code\nNew York City, New York\n****************~\nbanner motd ~\n*********************!!!IMPORTANT NOTICE!!!************************\n* This is a restricted system. All connections are logged. *\n* If you are not authorized to connect to this system, log *\n* off now. *\n* *\n* Violators will be prosecuted to the full extent of the law. *\n*******************************************************************\n* *\n**********************!!!AVIS IMPORTANT!!!*************************\n* L'acces au present systeme est limite et tous ses acces sont *\n* actuellement utilises. Si vous n'etes pas autorise a vous y *\n* raccorder, veuillez quitter ce systeme immediatement. *\n* *\n* Tout contrevenant sera poursuivi en vertu des mesures prevues *\n* par la loi. *\n*******************************************************************~", + "intended": "banner exec ~\n****************\nNetwork to Code\nNew York City, New York\n****************\n~\nbanner motd ~\n*********************!!!IMPORTANT NOTICE!!!************************\n* This is a restricted system. All connections are logged. *\n* If you are not authorized to connect to this system, log *\n* off now. *\n* *\n* Violators will be prosecuted to the full extent of the law. *\n*******************************************************************\n* *\n**********************!!!AVIS IMPORTANT!!!*************************\n* L'acces au present systeme est limite et tous ses acces sont *\n* actuellement utilises. Si vous n'etes pas autorise a vous y *\n* raccorder, veuillez quitter ce systeme immediatement. *\n* *\n* Tout contrevenant sera poursuivi en vertu des mesures prevues *\n* par la loi. *\n*******************************************************************\n~", "missing": "", "ordered_compliant": true, "unordered_compliant": true diff --git a/tests/unit/mock/config/compliance/compliance/cisco_nxos/nxos_basic_received.json b/tests/unit/mock/config/compliance/compliance/cisco_nxos/nxos_basic_received.json index 24d70f07..af729264 100644 --- a/tests/unit/mock/config/compliance/compliance/cisco_nxos/nxos_basic_received.json +++ b/tests/unit/mock/config/compliance/compliance/cisco_nxos/nxos_basic_received.json @@ -10,11 +10,11 @@ "unordered_compliant": true }, "banner": { - "actual": "banner motd ^C\nThis is a test,\nbanner message.^C", + "actual": "banner motd ^C\nThis is a test,\nbanner message.\n^C", "cannot_parse": true, "compliant": true, "extra": "", - "intended": "banner motd ^C\nThis is a test,\nbanner message.^C", + "intended": "banner motd ^C\nThis is a test,\nbanner message.\n^C", "missing": "", "ordered_compliant": true, "unordered_compliant": true diff --git a/tests/unit/mock/config/compliance/config_section_not_parsed/cisco_iosxr/iosxr_basic_received.json b/tests/unit/mock/config/compliance/config_section_not_parsed/cisco_iosxr/iosxr_basic_received.json index af176b37..a03e0488 100644 --- a/tests/unit/mock/config/compliance/config_section_not_parsed/cisco_iosxr/iosxr_basic_received.json +++ b/tests/unit/mock/config/compliance/config_section_not_parsed/cisco_iosxr/iosxr_basic_received.json @@ -1,5 +1,5 @@ { - "remaining_cfg": "hostname dfw1-core-01\nbanner exec ~\n****************\nNetwork to Code\nNew York City, New York\n****************\n~", + "remaining_cfg": "hostname dfw1-core-01", "section_not_found": [ "bgp" ] diff --git a/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_exec_received.py b/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_exec_received.py index 23b530ba..1ccfbe46 100644 --- a/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_exec_received.py +++ b/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_exec_received.py @@ -1,10 +1,10 @@ data = { "compliant": False, - "missing": "banner exec ^C\n=========\nintended config exec banner\n-========^C", - "extra": "banner exec ^C\n=========\nactual config exec banner\n-========^C", + "missing": "banner exec ^C\n=========\nintended config exec banner\n-========\n^C", + "extra": "banner exec ^C\n=========\nactual config exec banner\n-========\n^C", "cannot_parse": True, "unordered_compliant": False, "ordered_compliant": False, - "actual": "banner exec ^C\n=========\nactual config exec banner\n-========^C", - "intended": "banner exec ^C\n=========\nintended config exec banner\n-========^C", + "actual": "banner exec ^C\n=========\nactual config exec banner\n-========\n^C", + "intended": "banner exec ^C\n=========\nintended config exec banner\n-========\n^C", } diff --git a/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_motd_received.py b/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_motd_received.py index cbe38ba1..cd76bfe2 100644 --- a/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_motd_received.py +++ b/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_motd_received.py @@ -1,10 +1,10 @@ data = { "compliant": False, - "missing": "banner motd ^C\n======\nintended config motd banner\n======\n || ($hostname) ||^C", - "extra": "banner motd ^C\n======\nactual config motd banner\n======\n || ($hostname) ||^C", + "missing": "banner motd ^C\n======\nintended config motd banner\n======\n || ($hostname) ||\n^C", + "extra": "banner motd ^C\n======\nactual config motd banner\n======\n || ($hostname) ||\n^C", "cannot_parse": True, "unordered_compliant": False, "ordered_compliant": False, - "actual": "banner motd ^C\n======\nactual config motd banner\n======\n || ($hostname) ||^C", - "intended": "banner motd ^C\n======\nintended config motd banner\n======\n || ($hostname) ||^C", + "actual": "banner motd ^C\n======\nactual config motd banner\n======\n || ($hostname) ||\n^C", + "intended": "banner motd ^C\n======\nintended config motd banner\n======\n || ($hostname) ||\n^C", } diff --git a/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_received.py b/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_received.py index c140a6c5..68c9f3a6 100755 --- a/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_received.py +++ b/tests/unit/mock/config/compliance/feature_compliance/ios_dual_banner_received.py @@ -1,10 +1,10 @@ data = { "compliant": False, - "missing": "banner exec ^C\n=========\nintended config exec banner\n-========^C\nbanner motd ^C\n======\nintended config motd banner\n======\n || ($hostname) ||^C", - "extra": "banner exec ^C\n=========\nactual config exec banner\n-========^C\nbanner motd ^C\n======\nactual config motd banner\n======\n || ($hostname) ||^C", + "missing": "banner exec ^C\n=========\nintended config exec banner\n-========\n^C\nbanner motd ^C\n======\nintended config motd banner\n======\n || ($hostname) ||\n^C", + "extra": "banner exec ^C\n=========\nactual config exec banner\n-========\n^C\nbanner motd ^C\n======\nactual config motd banner\n======\n || ($hostname) ||\n^C", "cannot_parse": True, "unordered_compliant": False, "ordered_compliant": False, - "actual": "banner exec ^C\n=========\nactual config exec banner\n-========^C\nbanner motd ^C\n======\nactual config motd banner\n======\n || ($hostname) ||^C", - "intended": "banner exec ^C\n=========\nintended config exec banner\n-========^C\nbanner motd ^C\n======\nintended config motd banner\n======\n || ($hostname) ||^C", + "actual": "banner exec ^C\n=========\nactual config exec banner\n-========\n^C\nbanner motd ^C\n======\nactual config motd banner\n======\n || ($hostname) ||\n^C", + "intended": "banner exec ^C\n=========\nintended config exec banner\n-========\n^C\nbanner motd ^C\n======\nintended config motd banner\n======\n || ($hostname) ||\n^C", } diff --git a/tests/unit/mock/config/compliance/feature_compliance/ios_empty_banner_received.py b/tests/unit/mock/config/compliance/feature_compliance/ios_empty_banner_received.py index 0626f29d..0200280f 100755 --- a/tests/unit/mock/config/compliance/feature_compliance/ios_empty_banner_received.py +++ b/tests/unit/mock/config/compliance/feature_compliance/ios_empty_banner_received.py @@ -3,8 +3,8 @@ "cannot_parse": True, "compliant": False, "extra": "banner motd ^C^C", - "intended": "banner motd ^C\n" "actual banner example^C", - "missing": "banner motd ^C\n" "actual banner example^C", + "intended": "banner motd ^C\n" "actual banner example\n^C", + "missing": "banner motd ^C\n" "actual banner example\n^C", "ordered_compliant": False, "unordered_compliant": False, } diff --git a/tests/unit/mock/config/parser/base/cisco_ios/ios_banner_newline_received.py b/tests/unit/mock/config/parser/base/cisco_ios/ios_banner_newline_received.py new file mode 100644 index 00000000..9907aeef --- /dev/null +++ b/tests/unit/mock/config/parser/base/cisco_ios/ios_banner_newline_received.py @@ -0,0 +1,12 @@ +from netutils.config.parser import ConfigLine + +data = [ + ConfigLine(config_line="hostname banner_with_newline", parents=()), + ConfigLine(config_line="banner login ^C", parents=()), + ConfigLine( + config_line="****************************************************\nWARNING TO UNAUTHORIZED USERS:\nThis system is for use by authorized users only.\n****************************************************\n^C", + parents=("banner login ^C",), + ), + ConfigLine(config_line="line vty 0 4", parents=()), + ConfigLine(config_line=" transport ssh", parents=("line vty 0 4",)), +] diff --git a/tests/unit/mock/config/parser/base/cisco_ios/ios_banner_newline_sent.txt b/tests/unit/mock/config/parser/base/cisco_ios/ios_banner_newline_sent.txt new file mode 100644 index 00000000..90c9b758 --- /dev/null +++ b/tests/unit/mock/config/parser/base/cisco_ios/ios_banner_newline_sent.txt @@ -0,0 +1,13 @@ +hostname banner_with_newline +! +banner login ^C +**************************************************** +WARNING TO UNAUTHORIZED USERS: +This system is for use by authorized users only. +**************************************************** + +^C +! +line vty 0 4 + transport ssh +! \ No newline at end of file diff --git a/tests/unit/mock/config/parser/base/cisco_ios/ios_dual_banner_received.py b/tests/unit/mock/config/parser/base/cisco_ios/ios_dual_banner_received.py index d1eccc3d..dca51426 100755 --- a/tests/unit/mock/config/parser/base/cisco_ios/ios_dual_banner_received.py +++ b/tests/unit/mock/config/parser/base/cisco_ios/ios_dual_banner_received.py @@ -3,10 +3,10 @@ data = [ ConfigLine(config_line="hostname dual-banner", parents=()), ConfigLine(config_line="banner exec ^C", parents=()), - ConfigLine(config_line="=========\nintended config exec banner\n-========^C", parents=("banner exec ^C",)), + ConfigLine(config_line="=========\nintended config exec banner\n-========\n^C", parents=("banner exec ^C",)), ConfigLine(config_line="banner motd ^C", parents=()), ConfigLine( - config_line="======\nintended config motd banner\n======\n || ($hostname) ||^C", parents=("banner motd ^C",) + config_line="======\nintended config motd banner\n======\n || ($hostname) ||\n^C", parents=("banner motd ^C",) ), ConfigLine(config_line=None, parents=()), ] diff --git a/tests/unit/mock/config/parser/base/cisco_iosxr/iosxr_full_received.py b/tests/unit/mock/config/parser/base/cisco_iosxr/iosxr_full_received.py index 026e8ad3..d49f1c7e 100644 --- a/tests/unit/mock/config/parser/base/cisco_iosxr/iosxr_full_received.py +++ b/tests/unit/mock/config/parser/base/cisco_iosxr/iosxr_full_received.py @@ -40,12 +40,12 @@ ConfigLine(config_line="aaa authentication login default group AUTH local", parents=()), ConfigLine(config_line="banner exec ~", parents=()), ConfigLine( - config_line="****************\nNetwork to Code\nNew York City, New York\n****************~", + config_line="****************\nNetwork to Code\nNew York City, New York\n****************\n~", parents=("banner exec ~",), ), ConfigLine(config_line="banner motd ~", parents=()), ConfigLine( - config_line="*********************!!!IMPORTANT NOTICE!!!************************\n* This is a restricted system. All connections are logged. *\n* If you are not authorized to connect to this system, log *\n* off now. *\n* *\n* Violators will be prosecuted to the full extent of the law. *\n*******************************************************************\n* *\n**********************!!!AVIS IMPORTANT!!!*************************\n* L'acces au present systeme est limite et tous ses acces sont *\n* actuellement utilises. Si vous n'etes pas autorise a vous y *\n* raccorder, veuillez quitter ce systeme immediatement. *\n* *\n* Tout contrevenant sera poursuivi en vertu des mesures prevues *\n* par la loi. *\n*******************************************************************~", + config_line="*********************!!!IMPORTANT NOTICE!!!************************\n* This is a restricted system. All connections are logged. *\n* If you are not authorized to connect to this system, log *\n* off now. *\n* *\n* Violators will be prosecuted to the full extent of the law. *\n*******************************************************************\n* *\n**********************!!!AVIS IMPORTANT!!!*************************\n* L'acces au present systeme est limite et tous ses acces sont *\n* actuellement utilises. Si vous n'etes pas autorise a vous y *\n* raccorder, veuillez quitter ce systeme immediatement. *\n* *\n* Tout contrevenant sera poursuivi en vertu des mesures prevues *\n* par la loi. *\n*******************************************************************\n~", parents=("banner motd ~",), ), ConfigLine(config_line="vrf internet", parents=()), diff --git a/tests/unit/mock/config/parser/base/cisco_nxos/nxos_full_received.py b/tests/unit/mock/config/parser/base/cisco_nxos/nxos_full_received.py index 046e977f..50b5f89d 100644 --- a/tests/unit/mock/config/parser/base/cisco_nxos/nxos_full_received.py +++ b/tests/unit/mock/config/parser/base/cisco_nxos/nxos_full_received.py @@ -21,7 +21,7 @@ ConfigLine(config_line="feature vpc", parents=()), ConfigLine(config_line="feature lldp", parents=()), ConfigLine(config_line="banner motd ^C", parents=()), - ConfigLine(config_line="This is a test,\nbanner message.^C", parents=("banner motd ^C",)), + ConfigLine(config_line="This is a test,\nbanner message.\n^C", parents=("banner motd ^C",)), ConfigLine(config_line="logging level aaa 4", parents=()), ConfigLine(config_line="logging level acllog 4", parents=()), ConfigLine(config_line="logging level aclmgr 4", parents=()), diff --git a/tests/unit/mock/config/parser/base/paloalto_panos/panos_basic_received.py b/tests/unit/mock/config/parser/base/paloalto_panos/panos_basic_received.py index 053750f1..04c2c7e6 100644 --- a/tests/unit/mock/config/parser/base/paloalto_panos/panos_basic_received.py +++ b/tests/unit/mock/config/parser/base/paloalto_panos/panos_basic_received.py @@ -30,7 +30,7 @@ parents=(), ), ConfigLine( - config_line="************************************************************************\n* firewall1.example.com * [PROD VM500 firewalls]\n************************************************************************\n* WARNING *\n* Unauthorized access to this device or devices attached to *\n* or accessible from this network is strictly prohibited. *\n* Possession of passwords or devices enabling access to this *\n* device or devices does not constitute authorization. Unauthorized *\n* access will be prosecuted to the fullest extent of the law. *\n* *\n************************************************************************^C", + config_line="************************************************************************\n* firewall1.example.com * [PROD VM500 firewalls]\n************************************************************************\n* WARNING *\n* Unauthorized access to this device or devices attached to *\n* or accessible from this network is strictly prohibited. *\n* Possession of passwords or devices enabling access to this *\n* device or devices does not constitute authorization. Unauthorized *\n* access will be prosecuted to the fullest extent of the law. *\n* *\n************************************************************************\n\n^C", parents=('set deviceconfig system login-banner "',), ), ConfigLine( diff --git a/tests/unit/mock/config/parser/base/paloalto_panos/panos_full_received.py b/tests/unit/mock/config/parser/base/paloalto_panos/panos_full_received.py index 3d4984ec..4cf8a408 100644 --- a/tests/unit/mock/config/parser/base/paloalto_panos/panos_full_received.py +++ b/tests/unit/mock/config/parser/base/paloalto_panos/panos_full_received.py @@ -272,7 +272,7 @@ ConfigLine(config_line="set deviceconfig system hostname firewall1", parents=()), ConfigLine(config_line='set deviceconfig system login-banner "', parents=()), ConfigLine( - config_line="************************************************************************\n* firewall1.example.com * [PROD VM500 firewalls]\n************************************************************************\n* WARNING *\n* Unauthorized access to this device or devices attached to *\n* or accessible from this network is strictly prohibited. *\n* Possession of passwords or devices enabling access to this *\n* device or devices does not constitute authorization. Unauthorized *\n* access will be prosecuted to the fullest extent of the law. *\n* *\n************************************************************************^C", + config_line="************************************************************************\n* firewall1.example.com * [PROD VM500 firewalls]\n************************************************************************\n* WARNING *\n* Unauthorized access to this device or devices attached to *\n* or accessible from this network is strictly prohibited. *\n* Possession of passwords or devices enabling access to this *\n* device or devices does not constitute authorization. Unauthorized *\n* access will be prosecuted to the fullest extent of the law. *\n* *\n************************************************************************\n\n^C", parents=('set deviceconfig system login-banner "',), ), ConfigLine( diff --git a/tests/unit/mock/config/parser/base/ruckus_fastiron/fastiron_full_received.py b/tests/unit/mock/config/parser/base/ruckus_fastiron/fastiron_full_received.py index f4f23307..04dc3ae1 100644 --- a/tests/unit/mock/config/parser/base/ruckus_fastiron/fastiron_full_received.py +++ b/tests/unit/mock/config/parser/base/ruckus_fastiron/fastiron_full_received.py @@ -11,7 +11,7 @@ ConfigLine(config_line=" stack-port 1/3/2", parents=("stack unit 1",)), ConfigLine(config_line="banner motd $", parents=()), ConfigLine( - config_line="+----------------+ WARNING RUCKUS SWITCH +---------------+\n.\n. Access to this system is limited to authorized\n. users and for official purposes only\n.\n. Your activities will be logged and abuse\n. will be reported!\n.\n+----------------+ WARNING RUCKUS SWITCH +---------------+$", + config_line="+----------------+ WARNING RUCKUS SWITCH +---------------+\n.\n. Access to this system is limited to authorized\n. users and for official purposes only\n.\n. Your activities will be logged and abuse\n. will be reported!\n.\n+----------------+ WARNING RUCKUS SWITCH +---------------+ $", parents=("banner motd $",), ), ConfigLine(config_line="vlan 1 name DEFAULT-VLAN by port", parents=()), diff --git a/tests/unit/test_banner.py b/tests/unit/test_banner.py index 273f0aa1..4c03ec52 100644 --- a/tests/unit/test_banner.py +++ b/tests/unit/test_banner.py @@ -4,11 +4,11 @@ from netutils import banner -BANNER_CARET_C = "banner login ^C\n******************\n TEST BANNER\n******************^C" +BANNER_CARET_C = "banner login ^C\n******************\n TEST BANNER\n******************\n^C" banner_config_and_delimiter = [ { - "sent": ["banner login ^\n******************\n TEST BANNER\n******************^", "^", "^C"], + "sent": ["banner login ^\n******************\n TEST BANNER\n******************\n^", "^", "^C"], "received": BANNER_CARET_C, }, { @@ -16,7 +16,7 @@ "received": "banner login ^C\n******************\n TEST BANNER\n******************\n^C", }, { - "sent": ["banner login ^C\n******************\n TEST BANNER\n******************^C", "^C", "^C"], + "sent": ["banner login ^C\n******************\n TEST BANNER\n******************\n^C", "^C", "^C"], "received": BANNER_CARET_C, }, { @@ -24,23 +24,23 @@ "received": "banner login ^C\n******************\n TEST BANNER\n******************\n^C", }, { - "sent": ["banner login \x03\n******************\n TEST BANNER\n******************\x03", "\x03", "^C"], + "sent": ["banner login \x03\n******************\n TEST BANNER\n******************\n\x03", "\x03", "^C"], "received": BANNER_CARET_C, }, { - "sent": ["banner login ^CCCCC\n******************\n TEST BANNER\n******************^C", "^C", "^C"], + "sent": ["banner login ^CCCCC\n******************\n TEST BANNER\n******************\n^C", "^C", "^C"], "received": BANNER_CARET_C, }, { - "sent": ["banner login ^C\n******************\n TEST BANNER\n******************^C", "^C", "^"], - "received": "banner login ^\n******************\n TEST BANNER\n******************^", + "sent": ["banner login ^C\n******************\n TEST BANNER\n******************\n^C", "^C", "^"], + "received": "banner login ^\n******************\n TEST BANNER\n******************\n^", }, { - "sent": ["banner login ^C\n******************\n TEST BANNER\n******************^C", "^C", "\x03"], - "received": "banner login \x03\n******************\n TEST BANNER\n******************\x03", + "sent": ["banner login ^C\n******************\n TEST BANNER\n******************\n^C", "^C", "\x03"], + "received": "banner login \x03\n******************\n TEST BANNER\n******************\n\x03", }, { - "sent": ["banner login #\n******************\n TEST BANNER\n******************#", "#", "^C"], + "sent": ["banner login #\n******************\n TEST BANNER\n******************\n#", "#", "^C"], "received": BANNER_CARET_C, }, { @@ -51,27 +51,27 @@ banner_config = [ { - "sent": ["^", "banner login ^\n******************\n TEST BANNER\n******************^"], + "sent": ["^", "banner login ^\n******************\n TEST BANNER\n******************\n^"], "received": BANNER_CARET_C, }, { - "sent": ["^C", "banner login ^C\n******************\n TEST BANNER\n******************^C"], + "sent": ["^C", "banner login ^C\n******************\n TEST BANNER\n******************\n^C"], "received": BANNER_CARET_C, }, { - "sent": ["\x03", "banner login \x03\n******************\n TEST BANNER\n******************\x03"], + "sent": ["\x03", "banner login \x03\n******************\n TEST BANNER\n******************\n\x03"], "received": BANNER_CARET_C, }, { - "sent": ["^C", "banner login ^CCCCC\n******************\n TEST BANNER\n******************^C"], + "sent": ["^C", "banner login ^CCCCC\n******************\n TEST BANNER\n******************\n^C"], "received": BANNER_CARET_C, }, { - "sent": ["#", "banner login #\n******************\n TEST BANNER\n******************#"], + "sent": ["#", "banner login #\n******************\n TEST BANNER\n******************\n#"], "received": BANNER_CARET_C, }, { - "sent": ["Z", "banner login Z\n******************\n TEST BANNER\n******************Z"], + "sent": ["Z", "banner login Z\n******************\n TEST BANNER\n******************\nZ"], "received": BANNER_CARET_C, }, ]