RhinoSecurityLabs / IPRotate_Burp_Extension

Extension for Burp Suite which uses AWS API Gateway to rotate your IP on every request.
807 stars 144 forks source link

ImportError: No module named boto3 #4

Closed mamoss1 closed 5 years ago

mamoss1 commented 5 years ago

This is more of a Burp Suite issue I believe, but figured i'd ask anyway. When importing IPRotate.py to Burp Suite, the following error is produced:

Traceback (most recent call last): File "C:\Users.......................\Burp Suite Extensions\IPRotate_Burp_Extension-master\IPRotate_Burp_Extension-master\IPRotate.py", line 8, in import boto3 ImportError: No module named boto3

at org.python.core.Py.ImportError(Py.java:328)
at org.python.core.imp.import_first(imp.java:877)
at org.python.core.imp.import_module_level(imp.java:972)
at org.python.core.imp.importName(imp.java:1062)
at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
at org.python.core.PyObject.__call__(PyObject.java:431)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importOne(imp.java:1081)
at org.python.pycode._pyx4.f$0(C:\Users\.......................\Burp Suite Extensions\IPRotate_Burp_Extension-master\IPRotate_Burp_Extension-master\IPRotate.py:22)
at org.python.pycode._pyx4.call_function(C:\Users\...........................\Burp Suite Extensions\IPRotate_Burp_Extension-master\IPRotate_Burp_Extension-master\IPRotate.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1386)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:535)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at burp.mke.<init>(Unknown Source)
at burp.igf.a(Unknown Source)
at burp.gc.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)

I have jython standalone jar installed, guessing it has something to do with being able to import the module inside the jar. Any help would be appreciated!

DaveYesland commented 5 years ago

The extension uses the Boto3 AWS module https://pypi.org/project/boto3/. Make sure this is installed for Python 2 and it should fix the issue. pip install boto3

mamoss1 commented 5 years ago

Thanks for the answer @DaveYesland ! My issue ended up being that I need to directly point my burp python environment to the python modules.

For anyone having the same import issue, just find the folder where your python modules are, copy the file path, go back into Burp and add the path to "Python Environment > Folder for loading modules".

illtellyoulater commented 2 years ago

Not sure I understand: does IPRotate rely on the system's Python 2 Boto3 package (installed with pip install boto3) or does Boto3 need to be installed as a Jython module, with java -jar jython-standalone-2.7.2.jar -m pip install boto3?

realcorvus commented 2 years ago

If it helps anyone, I'm on macOS and what I did is:

  1. Install the standalone Jython JAR, by putting its location in "Location of Jython standalone JAR file".
  2. In my locally installed python2, install boto3 with python2 -m pip install boto3
  3. Start a python2 interpreter
  4. Run:
Python 2.7.16
>>> import boto3
>>> print boto3.__file__
/Users/youruserhere/Library/Python/2.7/lib/python/site-packages/boto3/__init__.pyc

I put /Users/youruserhere/Library/Python/2.7/lib/python/site-packages in the "Folder for loading modules (optional) part of "Python environment and everything worked.