alexforster / sisqo Goto Github PK
View Code? Open in Web Editor NEWMore friendly access to Cisco-style CLIs from Python
License: BSD 3-Clause "New" or "Revised" License
More friendly access to Cisco-style CLIs from Python
License: BSD 3-Clause "New" or "Revised" License
@todo try actually running the example
I just encountered a piece of gear that prompts interactively like so–
[alexforster-mbp:~]$ ssh user@switch
#
#Password:
My guess is that the issue is at ssh.py#L288-L294
Need repr(value) here:
Line 490 in 4d88180
When going through multiple jumpboxes (rare, I know), it's possible to be prompted twice for a passphrase or password. Right now, the default promptCallback will never try the same credential twice in succession, instead considering that an indication of failure and bailing out. Since ssh
does not distinguish between a successful or unsuccessful response to Password:
or Enter passphrase for key:
without turning up verbosity, let's relax this and allow the default promptCalback to try the same credential successively, say, three times? Arbitrary, but should cover almost all imaginable out-of-box usecases.
Line 127 in 4d88180
Bump this to 10
In SSH.py the line
self._proxyCommand = str(proxyCommand)
will result in the string 'None' being stored in the _proxyCommand variable when the default parameter is used. This causes this line
self._proxySocket = paramiko.ProxyCommand(proxyCommand) if proxyCommand else None
in the __ enter __ method to fail with the error 'OSError: [Errno 2] No such file or directory'. Here proxyCommand is not None, but actually contains the string 'None'.
At ssh.py#L409 the re.match
call should be changed to re.findall
. This code was duplicated logic from ssh.py#L265, but at L265 we're working specifically with the last line of output, not (potentially) multiple lines of output like we are at L409.
Should be pretty easy to port our code to Python 3.
ptyprocess
is PY3 compatible.
If pyte
+wcwidth
aren't PY3 compatible, then we're gonna' have a bad time – they do a lot of heavy lifting.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.