Skip to content

关于chapter02中sshcmd.py的运行问题 #1

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

Closed
UesugiErii opened this issue May 20, 2017 · 4 comments
Closed

关于chapter02中sshcmd.py的运行问题 #1

UesugiErii opened this issue May 20, 2017 · 4 comments

Comments

@UesugiErii
Copy link

为什么在kali linux中可以运行,在windows10下无法运行
错误信息:
D:\Python\black_hat_Python\chapter02>python ssh__command.py
Traceback (most recent call last):
File "ssh__command.py", line 5, in
import paramiko
File "F:\Python27\lib\site-packages\paramiko_init_.py", line 30, in
from paramiko.transport import SecurityOptions, Transport
File "F:\Python27\lib\site-packages\paramiko\transport.py", line 54, in
from paramiko.dsskey import DSSKey
File "F:\Python27\lib\site-packages\paramiko\dsskey.py", line 27, in
from cryptography.hazmat.primitives.asymmetric.utils import (
File "F:\Python27\lib\site-packages\cryptography\hazmat\primitives\asymmetric\utils.py", line 9, in
from asn1crypto.algos import DSASignature
File "F:\Python27\lib\site-packages\asn1crypto\algos.py", line 23, in
from ._int import fill_width
File "F:\Python27\lib\site-packages\asn1crypto_int.py", line 56, in
from ._perf._big_num_ctypes import libcrypto
File "F:\Python27\lib\site-packages\asn1crypto_perf_big_num_ctypes.py", line 31, in
libcrypto_path = find_library('crypto')
File "F:\Python27\lib\ctypes\util.py", line 53, in find_library
fname = os.path.join(directory, name)
File "F:\Python27\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd3 in position 2: ordinal not in range(128)

提示编码错误,我不知道哪里错误了

@giantbranch
Copy link
Owner

看最后两行,会不会路径的问题

@UesugiErii
Copy link
Author

我怀疑是路径编码出错,可是我看不懂ntpath.py源代码,你在windows上运行有报错吗?

@giantbranch
Copy link
Owner

我当时是在Windows 7上运行的,没报这个问题

@woshitianlong
Copy link

怎么解决的?我也遇到一样的问题,始终不得其解

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

3 participants