python - PySNMP 无法在 Ubuntu Precise 上发送使用 AES 加密的陷阱

标签 python python-2.7 encryption pysnmp

我使用pysnmp Python lib来发送陷阱,使用snmptrap命令行工具来接收,但当我使用AES加密时,客户端无法解析。

有趣的是,如果我使用 DES 或关闭加密,那么它就可以工作。如果我使用命令行工具发送 AES 加密陷阱,那么它也可以工作

这是使用的库的版本:

dpkg -l | grep pysnmp
ii  python-pysnmp-common                4.1.9a-2ubuntu1               Python SNMP library for agents and managers (version selection module)
ii  python-pysnmp4                      4.1.9a-2ubuntu1               Python SNMP library for agents and managers (unstable branch)

最佳答案

我找到了一个关于这个问题的邮件线程

http://sourceforge.net/p/pysnmp/mailman/message/27820538/

Your test case works for me with pysnmp release 4.1.16a. According to the pysnmp/CHANGES file, many AES-related fixes have been made at 4.1.14a.

Therefore please upgrade to the latest pysnmp release (4.1.16a) and try again.

-ilya

解决方案

python-pysnmp4包升级到4.1.16a+版本。 Ubuntu Precise 不包含固定版本,因此您有两个选择:

仅供引用: Ubuntu 中 python-pysnmp4 DEB 的依赖是错误的,因此也必须更新 python-pyasn1 软件包! 例如:python-pyasn1=0.1.4-0ubuntu1

<小时/>

更新

以下是用于跟踪更改/检查错误修复的更改日志:http://pysnmp.sourceforge.net/changes.html

谢谢伊利亚!

关于python - PySNMP 无法在 Ubuntu Precise 上发送使用 AES 加密的陷阱,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26638591/

相关文章:

python - 在模块上调用 dir 函数

python - 将文本文件转换为字典

python - 在字典中查找所有可能性(Python 2.7)

c++ - 使用 Windows Crypto API 和 C++ 的 PKCS #7 encryptedDigest 解密和验证

python - 导入文件夹中所有文件中的所有类(或函数),就好像它们都在 __init__ 文件中一样

python - 检查2个列表是否具有相同的值或值、索引

python - pip 未被识别为内部或外部命令

python - Django 通过通用 USERNAME_FIELD 获取用户

c# - 如何将 XML 写入加密文件?

CipherSaber 漏洞