10 ms·
I see telnetlib is on the way out in 3.13 or so, which means a lot of pointless busywork in my future. Its a super useful module for a lot of tasks. The sugges
by nibbleshifter 4y ago
I see telnetlib is on the way out in 3.13 or so, which means a lot of pointless busywork in my future. Its a super useful module for a lot of tasks.
The suggested replacements either are asyncio based (which means whole ass rewrites as asyncio is really fucking opinionated), or are excessively restrictive in some stupid way.
"Infosec" at work tend to raise a ruckus when their scans detect "older" versions of Python on machines too, so virtualenv'ing to pin versions or similar is often not the most practical in prod without getting an exception.
- deleted 4y ago[deleted]
- Someone 4y agoI would expect them to move telnetlib to a separate, unsupported repo that you can then import. Even if they don’t, from a cursory view, it seems it’s a pure python library (https://github.com/python/cpython/blob/main/Lib/telnetlib.py https://github.com/python/cpython/blob/main/Lib/telnetlib.py). If so, can’t you copy the current code into your project? You would take on the burden of supporting it, but looking at https://github.com/python/cpython/commits/main/Lib/telnetlib.py https://github.com/python/cpython/commits/main/Lib/telnetlib..., that doesn’t seem to be much of a burden.
- manfre 4y agoPEP-0594 lists the deprecated packages and any potential replacements. https://peps.python.org/pep-0594/#telnetlib https://peps.python.org/pep-0594/#telnetlib
- jacob019 4y agoYou should be able to repackage it as a module.
- noobermin 4y agoThat's what I'm thinking, someone could always throw it up on pypi
- worldsavior 4y agoTelnet should not be used anymore. Its an old protocol, and not suitable for today especially in the case of security. You can easily migrate to ssh.
- indymike 4y agoOne does not use telnet as telnet when doing security work. Telnet + sclient (you can also use tons of other tools, too) lets you inspect many servers that have TLS security. SSH does not.
- worldsavior 4y agoThere are hacks, sure, but its not telnet. It becomes a "fork" of telnet which enables you to have more functionality. Thats not telnet.
- NegativeK 4y agoPart of security is acknowledging that business needs can't always fit in rigid ideals and coming up with compensating controls.
- acdha 4y agoYes, but that doesn’t mean you just leave telnet running decades after it became obsolete. That should be a time limited waiver and mitigations, and if you have legacy devices which absolutely need Telnet you should be planning for what you’ll do when something that old finally breaks and you have the resources to port relatively simple code.
- henrydark 4y agoThis is circular: sure, if telnet is _obsolete_, then remove it. But being obsolete exactly means no one is using it anymore. If someone is using it, then it's not obsolete. Regarding security, some would advocate that telnet, or whatever else, is secure at least as much as the network underlying it. So anyone who puts their "legacy" telnet apps on a VPC is fine, and has decades more to enjoy software that has already been running for decades.
- gautamdivgi 4y agoWhat do you use telnet for today? Almost everyone uses ssh. The reason behind that was to provide TLS. Is there a reason you can’t use ssh?