首页
社区
课程
招聘
[求助]python的问题
发表于: 2016-8-10 12:47 3670

[求助]python的问题

2016-8-10 12:47
3670
代码:test1.py

import paramiko
from scpclient import *
from contextlib import closing
from time import sleep
import struct

hostname = "192.168.10.104"
username = "test1"
password = "asdf"
req = "A" * 500

ssh_client = paramiko.SSHClient()
ssh_client.load_system_host_keys()
ssh_client.connect(hostname,username=username,key_filename=None,password=password)
sleep(15)
with closing(Read(ssh_client.get_transport(), req)) as scp:
	scp.receive("foo.txt")


编译:
> python test1.py

Traceback (most recent call last):
  File "prosshd1.py", line 13, in <module>
    ssh_client.load_system_host_keys()
  File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 101, in load_system_host_keys
    self._system_host_keys.load(filename)
  File "/usr/local/lib/python2.7/dist-packages/paramiko/hostkeys.py", line 101, in load
    e = HostKeyEntry.from_line(line, lineno)
  File "/usr/local/lib/python2.7/dist-packages/paramiko/hostkeys.py", line 335, in from_line
    key = ECDSAKey(data=decodebytes(key), validate_point=False)
  File "/usr/local/lib/python2.7/dist-packages/paramiko/ecdsakey.py", line 138, in __init__
    self.verifying_key = numbers.public_key(backend=default_backend())
  File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/__init__.py", line 35, in default_backend
    _default_backend = MultiBackend(_available_backends())
  File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/__init__.py", line 22, in _available_backends
    "cryptography.backends"
AttributeError: 'EntryPoint' object has no attribute 'resolve'



请教如何解决........

[培训]科锐逆向工程师培训第53期2025年7月8日开班!

收藏
免费 0
支持
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回