ngo / burp-request-minimizer

14 stars 4 forks source link

ImportError: No module named xmltodict #5

Closed Hipapheralkus closed 6 years ago

Hipapheralkus commented 6 years ago

I followed the guide precisely, I downloaded the whole project in zip, installed requirements with pip, relaunched Burp and added extender, but I always get the error... When I try again pip install -r requirements I get back Requirement already satisfied: xmltodict==0.11.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 1)) (0.11.0) Here is the trace from Burp Error tab:

Traceback (most recent call last):
  File "C:\Users\user\Desktop\burp-request-minimizer-master\minimizer.py", line 8, in <module>
    import xmltodict
ImportError: No module named xmltodict

    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\user\Desktop\burp-request-minimizer-master\minimizer.py:163)
    at org.python.pycode._pyx4.call_function(C:\Users\user\Desktop\burp-request-minimizer-master\minimizer.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.l5.<init>(Unknown Source)
    at burp.i7i.a(Unknown Source)
    at burp.hrb.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)

Could you please amend your guide with how should I proceed, or let me know if I missed something? Many thanks

ngo commented 6 years ago

You should specify "Folder for loading modules" in Extender->Options->Python environment. In your case it would be "c:\python27\lib\site-packages"

Note, though, that you were using cpython pip (not jython's) to install that package. In this case it is ok, because xmltodict is a pure python package, but in general is preferable to use jython's pip, it will be in jython's install dir (probably somewhere in C:\jython2.7\bin\pip). In that case the modules dir will be something like C:\jython2.7\lib\site-packages.

Hipapheralkus commented 6 years ago

thanks for the explanation, it works perfectly now:) Maybe you could add this info to your installation guideline?:)

ngo commented 6 years ago

I've updated the README.md