Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with nxos #191

Open
int3rlop3r opened this issue Mar 25, 2019 · 2 comments
Open

Problem with nxos #191

int3rlop3r opened this issue Mar 25, 2019 · 2 comments

Comments

@int3rlop3r
Copy link
Contributor

There are some versions of Nexus switches that have a null byte in their prompt - '\x00' and hence doesn't match the prompt re even though the driver was set to nxos.

Exscript.protocols.exception.TimeoutException: Buffer: u'\r\nCisco Nexus Operating System (NX-OS) Software\r\nTAC support: http://www.cisco.com/tac\r\nCopyright (c) 2002-2014, Cisco Systems, Inc. All rights reserved.\r\nThe copyrights to certain works contained in this software are\r\nowned by other third parties and used and distributed under\r\nlicense. Certain components of this software are licensed under\r\nthe GNU General Public License (GPL) version 2.0 or the GNU\r\nLesser General Public License (LGPL) Version 2.1. A copy of each\r\nsuch license is available at\r\nhttp://www.opensource.org/licenses/gpl-2.0.php and\r\nhttp://www.opensource.org/licenses/lgpl-2.1.php\r\n\r\x00HOST-1# '
@int3rlop3r
Copy link
Contributor Author

Is there any release scheduled this week?

Mir-ina added a commit to Mir-ina/exscript that referenced this issue Oct 18, 2023
@Mir-ina
Copy link

Mir-ina commented Oct 18, 2023

I suppose that the same problem will appear for any telnet server, which can use binary telnet transmittion (RFC 856), because the TRANSMIT-BINARY equal 0 (zero).
We see this when we use exscript to connect to telnetlib3.server, for example (python3 -m telnetlib3.server). In this case can see the traceback:
Traceback (most recent call last): File "/.../Exscript/workqueue/job.py", line 78, in run self.function(self) File "/.../Exscript/queue.py", line 102, in _wrapped result = func(job, host, conn, *args, **kwargs) File "/home/yren/workspace/sandbox/python-test/telnet/simple-exscript.py", line 8, in do_something conn.expect('tel:sh') File "/.../Exscript/protocols/protocol.py", line 1058, in expect result = self._expect(prompt) File "/.../Exscript/protocols/protocol.py", line 1033, in _expect result = self._domatch(to_regexs(prompt), True) File "/.../Exscript/protocols/telnet.py", line 85, in _domatch result, match, self.response = func( File "/.../Exscript/protocols/telnetlib.py", line 754, in expect return self._waitfor(relist, timeout, True, cleanup=cleanup) File "/.../Exscript/protocols/telnetlib.py", line 672, in _waitfor self.process_rawq() File "/.../Exscript/protocols/telnetlib.py", line 545, in process_rawq command == WILL and 'WILL' or 'WONT', ord(opt)) TypeError: ord() expected a character, but string of length 0 found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants