Looking for a way to manipulate SSH packets

Looking for a way to manipulate SSH packets

Postby binenvpython » Tue Aug 06, 2013 8:19 pm

I need a way to manipulate SSH packets. So far, I've been almost universally directed to Scapy, which, while it fits the bill perfectly, seems to lack support for Python 3.x (although why such a project would be orphaned is beyond me).
Does anyone know of a library, a module, or just any way to edit outgoing SSH packets from a Python program?
binenvpython
 
Posts: 3
Joined: Tue Aug 06, 2013 8:18 pm

Re: Looking for a way to manipulate SSH packets

Postby micseydel » Tue Aug 06, 2013 8:35 pm

I hadn't heard of Scapy but I can see why people recommended it. It probably is what you need.

Projects without Python 3 support aren't necessarily orphaned, Python 3 at this point (years after its release) hasn't caught on. Is there an essential reason you need Python 3?
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 1132
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Looking for a way to manipulate SSH packets

Postby binenvpython » Tue Aug 06, 2013 8:44 pm

Well, Python 3 support would just be for the long term. Python 3's going to have to catch on sooner or later, and having to rework this kind of element in my program entirely is a problem I'd like to get out of the way as soon as possible.
binenvpython
 
Posts: 3
Joined: Tue Aug 06, 2013 8:18 pm

Re: Looking for a way to manipulate SSH packets

Postby micseydel » Wed Aug 07, 2013 2:55 am

binenvpython wrote:Python 3's going to have to catch on sooner or later

Don't be so sure. Also, even if it does, Python 2 is probably going to stick around.

and having to rework this kind of element in my program entirely is a problem I'd like to get out of the way as soon as possible.

Most of the differences are small. If you'd like our advice about it, we can let you know how big of a deal it would be, but I suspect it would be a very minor change.
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 1132
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Looking for a way to manipulate SSH packets

Postby binenvpython » Wed Aug 07, 2013 1:39 pm

micseydel wrote:Don't be so sure. Also, even if it does, Python 2 is probably going to stick around.


I can't let you not elaborate on that. All enterprise environments move forward eventually, even if progress means taking a step back (looking at `print`/`print()` right now). Why would Python3 just not catch on?
binenvpython
 
Posts: 3
Joined: Tue Aug 06, 2013 8:18 pm

Re: Looking for a way to manipulate SSH packets

Postby micseydel » Wed Aug 07, 2013 4:25 pm

Python 3 making that change is not evidence that enterprise environments do so. Python 2.7 was released over three years ago, and my workplace is still using Python 2.6.6, released about two years ago. Even though Python 2.7 has nice extra features and maintains backwards compatibility with 2.7, they haven't upgraded. And they might upgrade to 2.7 at some point, but if they upgrade to Python 3, just about all existing code breaks, and has to be re-written. If good unit tests weren't written, that's a huge deal. Python not being static means that debugging typically requires running the code, and if you don't get 100% line coverage by your tests, you could have a surprise crash in production.

Companies will happily re-write code if it's worth it. Few seem to have thought Python 3 is worth it. Starting from Python 3? Sure! Upgrading, and breaking existing code? Not as much. Python 3 is great, but it's really just a cleaned up version of Python 2. Many of its nice features have been backported to Python 2.7 (which is what I personally use).

I don't mean to crap on Python 3 at all, it's just that in the business world life isn't as nice as "always use the newest version".
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 1132
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to Networking

Who is online

Users browsing this forum: No registered users and 2 guests