Skip to content

"ImportError: No module named..." issue #7

@matth82

Description

@matth82

When I want to import various libraries it gives an error (when using a .py script on my kali the import of these libs works):

import base64
import hashlib
import time
import json
import jwt
from Crypto.PublicKey import RSA

Error log:

Traceback (most recent call last):
  File "/home/matt/.BurpSuite/bapps/eb563ada801346e6bdb7a7d7c5c52587/models.py", line 165, in processHttpMessage
    exec(self._code, globals_, locals_)
  File "<string>", line 3, in <module>
ImportError: No module named Crypto
...
ImportError: No module named jwt

Now I used /home/matt/.local/lib/python3.9/site-packages as maindir in the 'Folder for loading modules (optional)' section in the Extender->Options tab an it seems to work. However, creating a global function using def... gives me:

"NameError: global name 'base64' is not defined" -> apparently one can use 'import' within a global function to resolve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions