Burp Suite User Forum

Create new post

Turbo Intruder ( Import error of a python library - requests module )

Mritunjya | Last updated: Sep 30, 2023 07:01AM UTC

https://forum.portswigger.net/thread/turbo-intruder-import-error-of-a-python-library-requests-module-6ae4fd21 My query got unanswered. Please can someone look into this ...

Michelle, PortSwigger Agent | Last updated: Oct 02, 2023 07:43AM UTC

Hi If you use one of the example scripts that come with Turbo Intruder, do you have the same issue?

Mritunjya | Last updated: Oct 02, 2023 07:51AM UTC

No it's working completely fine. I am trying to use external libraries of Python for extended use, in this case which ```requests``` library of Python, which is not getting imported, so I posted my debug errors in other thread

Michelle, PortSwigger Agent | Last updated: Oct 02, 2023 02:38PM UTC

Hi Turbo Intruder uses Jython, which doesn't support 3+. Did you know you can use callbacks.makeHttpRequest to issue requests outside of the configured request engine? Would this help in your scenario?

Mritunjya | Last updated: Oct 03, 2023 09:06AM UTC

No, I am trying to add python3 functionality specifically ( not just requests functionality , I was just using requests module to test my python3 libraries ) So basically I have my own custom scripts of RNGs & z3 which only works in python3 So it would be helpful if you can point out how can I add python3 support to Turbo Intruder ??

Michelle, PortSwigger Agent | Last updated: Oct 03, 2023 09:46AM UTC

Turbo Intruder has been designed to use Jython, rather than Python. I'm afraid Jython doesn't support 3+. For sending requests, as we mentioned, there are other ways you may be able to achieve the same aims without needing to use the Python 3 requests module. For example, using callbacks.makeHttpRequest to issue requests outside of the configured request engine. For any other functionality you want to use, there may also be alternative options. Our support service is here to provide technical assistance with Burp Suite itself, but we will leave this thread open in case other users in the community have comments they would like to add.

Mritunjya | Last updated: Oct 03, 2023 10:22AM UTC

If you would see this Github Page: https://github.com/PortSwigger/turbo-intruder/issues/121 James Kettle said: "I believe third party libraries are supported, but currently only if they're written in Python themselves (ie, not C)." and I just want to know where I can tweak the Jython which turbo Intruder is installing, since I tried installing my own jython In which, python3 libraries worked like a charm so I guess Jython does support Python3 but only those libraries which are written in Pure Python The only thing I am not able to figure out is, how can I change the jython which Turbo Intruder is using ?? May be something like I can point Burp to use my own Jython ??? This would sort out my issue

Mritunjya | Last updated: Oct 03, 2023 10:24AM UTC

Hope this helps in understanding my Issue

Michelle, PortSwigger Agent | Last updated: Oct 03, 2023 01:48PM UTC

Hi Our support service is here to provide technical assistance with Burp Suite itself, but we will leave this thread open in case other users in the community have comments they would like to add. Having said that you may find this further explanation of our previous comments useful. As Turbo Intruder uses Jython you can use third-party libraries that are compatible with this. Jython doesn't support Python 3+. You can use third-party libraries that are written in Python, providing they’re written in something earlier than Python 3, so you can use third-party Python 2 libraries. You should also be aware that any libraries implemented in C that would only be compatible with Cython can not be used.

Mritunjya | Last updated: Oct 05, 2023 04:57PM UTC

That's what I explained above requests module is written in python itself and I tested it out with compiling jython on my own and it worked all good I guess I am bad at explaining stuff, please close the thread, I will explore it on my own :-( Thanks for sticking with me :-)

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.