Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Python extension import package error

Thomas Z Jul 11, 2019 09:48PM UTC

Hello,

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>
import AES
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


Rose Krawczuk Jul 15, 2019 01:41PM UTC Support Center agent

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.


Mike Eaton Oct 09, 2019 01:24PM UTC Support Center agent

Hi Thomas,

We apologize for the delay in responding to your query, we have had a backlog of support tickets to process so we have only just got round to responding to your ticket.

Would you be able to provide the full stack trace along with any other relevant information you may have?


Post Your public answer

Your name
Your email address
Answer