Closed lacroutelacroute closed 7 years ago
Tplmap requires a few additional python modules. See https://github.com/epinna/tplmap#install. Burp Extender Documentation is also helpful, see "Python Environment" part.
i have already installed my deb is kalilinux up to date
:~$ sudo pip freeze | egrep PyYAML Warning: cannot find svn location for chirp===daily-20170124 PyYAML==3.12 :~$ sudo pip freeze | egrep requests Warning: cannot find svn location for chirp===daily-20170124 requests==2.17.3 requests-file==1.4.1 requests-oauthlib==0.8.0
Install PyYAML for Jython: http://oldhammade.net/tip/2013/01/27/installing-pyyaml-for-jython.html
and install requests for Jython:
jython -m pip install requests
same error after installed dependance sudo /usr/local/sbin/jython-2.7/bin/jython -m pip freeze certifi==2017.4.17 chardet==3.0.3 idna==2.5 PyYAML==3.12 requests==2.17.3 urllib3==1.21.1
trace error
not load extension
Traceback (most recent call last):
File "/opt/tplmap/tplmap/burp_extension.py", line 9, in
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 utils.config$py.f$0(/opt/tplmap/tplmap/utils/config.py:22)
at utils.config$py.call_function(/opt/tplmap/tplmap/utils/config.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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 utils.loggers$py.f$0(/opt/tplmap/tplmap/utils/loggers.py:57)
at utils.loggers$py.call_function(/opt/tplmap/tplmap/utils/loggers.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at core.plugin$py.f$0(/opt/tplmap/tplmap/core/plugin.py:29)
at core.plugin$py.call_function(/opt/tplmap/tplmap/core/plugin.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at plugins.languages.python$py.f$0(/opt/tplmap/tplmap/plugins/languages/python.py:90)
at plugins.languages.python$py.call_function(/opt/tplmap/tplmap/plugins/languages/python.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.ensureFromList(imp.java:1024)
at org.python.core.imp.ensureFromList(imp.java:992)
at org.python.core.imp.import_module_level(imp.java:986)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at plugins.engines.mako$py.f$0(/opt/tplmap/tplmap/plugins/engines/mako.py:6)
at plugins.engines.mako$py.call_function(/opt/tplmap/tplmap/plugins/engines/mako.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at core.checks$py.f$0(/opt/tplmap/tplmap/core/checks.py:141)
at core.checks$py.call_function(/opt/tplmap/tplmap/core/checks.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at org.python.pycode._pyx5.f$0(/opt/tplmap/tplmap/burp_extension.py:313)
at org.python.pycode._pyx5.call_function(/opt/tplmap/tplmap/burp_extension.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.id.<init>(Unknown Source)
at burp.emc.a(Unknown Source)
at burp.qg.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
@jx6f any idea on how to fix this?
The ImportError: No module named yaml
error message indicates that yaml module is not included in "sys.path".
I think @lacroutelacroute misconfigured Burp Python Environment setting.
Could you tell me about Burp settings?
Please see above :~/Bureau$ sudo /usr/local/sbin/jython-2.7/bin/jython -m pip freeze [sudo] Mot de passe de fakessh : certifi==2017.4.17 chardet==3.0.3 idna==2.5 PyYAML==3.12 requests==2.17.3 urllib3==1.21.1
It is not burp's setting.
the correct trace of error is
$ cat /tmp/error.log
Traceback (most recent call last):
File "/opt/tplmap/tplmap/burp_extension.py", line 9, in
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 utils.config$py.f$0(/opt/tplmap/tplmap/utils/config.py:22)
at utils.config$py.call_function(/opt/tplmap/tplmap/utils/config.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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 utils.loggers$py.f$0(/opt/tplmap/tplmap/utils/loggers.py:57)
at utils.loggers$py.call_function(/opt/tplmap/tplmap/utils/loggers.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at core.plugin$py.f$0(/opt/tplmap/tplmap/core/plugin.py:29)
at core.plugin$py.call_function(/opt/tplmap/tplmap/core/plugin.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at plugins.languages.python$py.f$0(/opt/tplmap/tplmap/plugins/languages/python.py:90)
at plugins.languages.python$py.call_function(/opt/tplmap/tplmap/plugins/languages/python.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.ensureFromList(imp.java:1024)
at org.python.core.imp.ensureFromList(imp.java:992)
at org.python.core.imp.import_module_level(imp.java:986)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at plugins.engines.mako$py.f$0(/opt/tplmap/tplmap/plugins/engines/mako.py:6)
at plugins.engines.mako$py.call_function(/opt/tplmap/tplmap/plugins/engines/mako.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at core.checks$py.f$0(/opt/tplmap/tplmap/core/checks.py:141)
at core.checks$py.call_function(/opt/tplmap/tplmap/core/checks.py)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.imp.createFromPyClass(imp.java:236)
at org.python.core.imp.createFromPyClass(imp.java:205)
at org.python.core.imp.loadFromSource(imp.java:651)
at org.python.core.imp.find_module(imp.java:543)
at org.python.core.PyModule.impAttr(PyModule.java:106)
at org.python.core.imp.import_next(imp.java:842)
at org.python.core.imp.import_logic(imp.java:904)
at org.python.core.imp.import_module_level(imp.java:978)
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.importFromAs(imp.java:1156)
at org.python.core.imp.importFrom(imp.java:1132)
at org.python.pycode._pyx5.f$0(/opt/tplmap/tplmap/burp_extension.py:313)
at org.python.pycode._pyx5.call_function(/opt/tplmap/tplmap/burp_extension.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.id.<init>(Unknown Source)
at burp.emc.a(Unknown Source)
at burp.qg.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Please see "Python Environment" part of Burp Extender Documentation and check your burp. Error message is not helpful now.
There are several ways to setup "Python Environment" of burp. As a result of trying them, using Jython installer way was the most reliable and easy. Here is the example.
$ wget 'http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar' -O installer.jar
$ java -jar installer.jar -s -d /path/to/install/jython -t standard
$ cd /path/to/install/jython
$ ./bin/pip install PyYaml requests
burp_extender.py
as Python type burp extension@epinna Do you think it is better to add an example of the setup procedure to the document? This is a matter of configuring burp, it seems not to have much relation with Tplmap.
me i have correctly installed jython for tplmap and burp but do not work ~$ sudo /usr/local/sbin/jython-2.7/bin/jython -m pip freeze [sudo] Mot de passe de fakessh : certifi==2017.4.17 chardet==3.0.3 idna==2.5 PyYAML==3.12 requests==2.17.3 urllib3==1.21.1
Check your Burp settings. Please do not repeat same comment.
Could you tell me about Burp settings?
- Location of the Jython standalone JAR file
- Folder for loading modules
If you couldn't understand what I am talking about, try Jython installer according to https://github.com/epinna/tplmap/issues/29#issuecomment-307630536.
@jx6f that's a nice idea. To avoid adding too much details on the main README, we could move the module under a new folder (i.e. burp_extension/
or burp/
) together with a new README.md
with the burp extension details? After that, we can just add a cross reference the new README from the first one.
Feel free to do it if you feel so, or I'll try to do it the next days.
@epinna Sounds good:+1:. I'll do that.
@lacroutelacroute I'm closing this, please make sure you installed all the requirements here and retry.
loaded succes
hey pro
iam bugbounty hunter burp extension do not work up to date git pull
trace Traceback (most recent call last): File "/opt/tplmap/tplmap/burp_extension.py", line 9, in
from core.checks import plugins
File "/opt/tplmap/tplmap/core/checks.py", line 1, in
from plugins.engines.mako import Mako
File "/opt/tplmap/tplmap/plugins/engines/mako.py", line 1, in
from plugins.languages import python
File "/opt/tplmap/tplmap/plugins/languages/python.py", line 2, in
from core.plugin import Plugin
File "/opt/tplmap/tplmap/core/plugin.py", line 3, in
from utils.loggers import log
File "/opt/tplmap/tplmap/utils/loggers.py", line 4, in
import utils.config
File "/opt/tplmap/tplmap/utils/config.py", line 3, in
import yaml
ImportError: No module named yaml