The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

Python extension import package error

Thomas | Last updated: 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, PortSwigger Agent | Last updated: Jul 15, 2019 01:01PM UTC

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, PortSwigger Agent | Last updated: Jul 15, 2019 01:41PM UTC