pathetiq / BurpSmartBuster

A Burp Suite content discovery plugin that add the smart into the Buster!
MIT License
383 stars 68 forks source link

ImportError: No module named exceptions #23

Closed doomguy closed 7 years ago

doomguy commented 7 years ago

OS: Kali Rolling Burp: 1.7.27 Pro BurpSmartBuster: Install via BApp Store Jython Standalone: 2.7.0 (http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar) or 2.7.1 (https://repo1.maven.org/maven2/org/python/jython-standalone/2.7.1/jython-standalone-2.7.1.jar)

Errorlog:

Traceback (most recent call last):
  File "/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BurpSmartBuster.py", line 61, in <module>
    from tld import get_tld
  File "/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BappModules/tld/__init__.py", line 9, in <module>
    from tld.utils import get_tld, get_tld_names, update_tld_names, Result
  File "/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BappModules/tld/utils.py", line 18, in <module>
    from tld.exceptions import TldIOError, TldDomainNotFound, TldBadUrl
ImportError: No module named exceptions

    at org.python.core.Py.ImportError(Py.java:334)
    at org.python.core.imp.import_logic(imp.java:913)
    at org.python.core.imp.import_module_level(imp.java:970)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importFromAs(imp.java:1149)
    at org.python.core.imp.importFrom(imp.java:1124)
    at tld.utils$py.f$0(/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BappModules/tld/utils.py:143)
    at tld.utils$py.call_function(/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BappModules/tld/utils.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:664)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.PyModule.impAttr(PyModule.java:111)
    at org.python.core.imp.import_next(imp.java:840)
    at org.python.core.imp.import_logic(imp.java:905)
    at org.python.core.imp.import_module_level(imp.java:970)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importFromAs(imp.java:1149)
    at org.python.core.imp.importFrom(imp.java:1124)
    at tld$py.f$0(/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BappModules/tld/__init__.py:9)
    at tld$py.call_function(/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BappModules/tld/__init__.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:664)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.imp.import_next(imp.java:838)
    at org.python.core.imp.import_module_level(imp.java:957)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importFromAs(imp.java:1149)
    at org.python.core.imp.importFrom(imp.java:1124)
    at org.python.pycode._pyx6.f$0(/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BurpSmartBuster.py:1819)
    at org.python.pycode._pyx6.call_function(/root/.BurpSuite/bapps/7044ef35fa5a49b39285e101a79bf4ae/BurpSmartBuster.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.Py.runCode(Py.java:1614)
    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.gqh.<init>(Unknown Source)
    at burp.b0g.a(Unknown Source)
    at burp.kpe.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)

Any ideas on how to resolve this?

joeblack6 commented 7 years ago

I have a good solution for windows platform. This will probably worked at all platforms too. Open requirements.txt at BurpSuite C:\Users\youruser\AppData\Roaming\BurpSuite\bapps\ folder. You will see the versions necessary. I installed all this necessary packages manually. bs4==0.0.1 nltk==3.1 requests==2.10.0 textblob==0.11.0 tld==0.7.6 Download all packages from their website thereafter unzip package and manually install like thus: python setup.py install After installed the one package for example Go to original C:\Python27\Lib\site-packages directory and go to the textblob directory for example: C:\Python27\Lib\site-packages\textblob-0.11.0-py2.7.egg\textblob copy the contents of this folder to C:\Users\youruser\AppData\Roaming\BurpSuite\bapps\7044ef35fa5a49b39285e101a79bf4ae\BappModules\textblob .Do this for ntlk, requests and tld. Thereafter the extension worked for me...

pathetiq commented 7 years ago

Instead of installing all this manually download the jython 2.7.1 installer and using the pip in the bin folder run:

pip install -r requirements.txt

doomguy commented 7 years ago

This worked for me in the end on my Kali:

# download jython
wget https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar
# install jython (I used /root/bin/jython2.7.1)
java -jar jython-installer-2.7.1.jar 
cd /root/bin/jython2.7.1
# download BurpSmartBuster
mkdir tmp
cd tmp
git clone https://github.com/pathetiq/BurpSmartBuster.git
cd BurpSmartBuster
# install the dependencies
../../bin/pip install -r requirements.txt 
# Now go into Burp Suite > Extender > Options and set your jython Path to "/root/bin/jython2.7.1/jython.jar"
# Install BurpSmartBuster via BApp Store
# Happy hacking!