Python extension import package error
I've run into an application that AES encrypts the body of HTTP requests and responses, I am writing an extension to decrypt and encrypt the payloads.
I am writing the extension in Python and I receive an error when importing pycryptodome's AES module. I have moved AES.py into /usr/local/lib/python2.7/site-packages/ as the Crypto.Cipher.AES module is not recognized otherwise. Below is the error I am receiving. I can paste a full trace is necessary.
Any ideas on how, or if, I can resolve this issue?
Traceback (most recent call last):
File "/EXTENSION/LOCATION/burp_custom_http.py", line 8, in <module>
File "/usr/local/lib/python2.7/site-packages/AES.py", line 40, in <module>
from Crypto.Cipher import _create_cipher
File "/usr/local/lib/python2.7/site-packages/Crypto/Cipher/__init__.py", line 27, in <module>
from Crypto.Cipher._mode_ecb import _create_ecb_cipher
File "/usr/local/lib/python2.7/site-packages/Crypto/Cipher/_mode_ecb.py", line 29, in <module>
from Crypto.Util._raw_api import (load_pycryptodome_raw_lib,
File "/usr/local/lib/python2.7/site-packages/Crypto/Util/_raw_api.py", line 167, in <module>
from ctypes import (CDLL, c_void_p, byref, c_ulong, c_ulonglong, c_size_t,
ImportError: cannot import name create_string_buffer
Thomas, sorry for the delay. We have a bit of a backlog in terms of Extension-related queries. We’ll get back to you ASAP.