xnl-h4ck3r / GAP-Burp-Extension

Burp Extension to find potential endpoints, parameters, and generate a custom target wordlist
1.2k stars 131 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 32-35: invalid data #5

Closed KarahanGuner closed 1 year ago

KarahanGuner commented 1 year ago

I am getting this error while trying to install. I'm using Windows 10.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 32-35: invalid data

    at org.python.core.codecs.strict_errors(codecs.java:204)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.python.core.JavaFunc.__call__(Py.java:2912)
    at org.python.core.PyObject.__call__(PyObject.java:433)
    at org.python.core.codecs.decoding_error(codecs.java:1603)
    at org.python.core.codecs.insertReplacementAndGetResume(codecs.java:1572)
    at org.python.core.codecs.PyUnicode_DecodeUTF8Stateful(codecs.java:1104)
    at org.python.core.codecs.PyUnicode_DecodeUTF8(codecs.java:1021)
    at org.python.core.Py.fileSystemDecode(Py.java:722)
    at org.python.core.Py.fileSystemDecode(Py.java:735)
    at org.python.modules.posix.PosixModule.asPath(PosixModule.java:1306)
    at org.python.modules.posix.PosixModule.absolutePath(PosixModule.java:1317)
    at org.python.modules.posix.PosixModule.chdir(PosixModule.java:300)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208)
    at org.python.core.PyObject.__call__(PyObject.java:461)
    at org.python.core.PyObject.__call__(PyObject.java:465)
    at org.python.pycode._pyx2.f$0(<string>:1)
    at org.python.pycode._pyx2.call_function(<string>)
    at org.python.core.PyTableCode.call(PyTableCode.java:173)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.Py.runCode(Py.java:1703)
    at org.python.core.Py.exec(Py.java:1747)
    at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:268)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at burp.u7m.l(Unknown Source)
    at burp.dp8.I(Unknown Source)
    at burp.bsl.e(Unknown Source)
    at burp.rm2.lambda$panelLoaded$0(Unknown Source)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
xnl-h4ck3r commented 1 year ago

Hi @KarahanGuner, thanks for taking the time to report the problem. Apologies for the delay in responding, I've been away, but I'll look into it and get back to you very soon! Thanks

xnl-h4ck3r commented 1 year ago

Hi @KarahanGuner, can you go to https://github.com/xnl-h4ck3r/GAP-Burp-Extension/releases and click on GAP.py under Release v1.9 and load that? I am running Windows 10 myself, and I have just done this to double check and I don't see that error. Maybe you were using an older version? Please let me know if this resolves the issue or not. Many thanks Xnl

KarahanGuner commented 1 year ago

Just checked it, still the same problem. Could it be because my system is in Turkish?

xnl-h4ck3r commented 1 year ago

Hi. I'm not 100% sure. It may be to do with CRLF differences in unix and windows. Can you get this file, and change the .txt to .py (I can't add .py fiels here) and try that version instead? GAP.txt Thanks Xnl

KarahanGuner commented 1 year ago

This one also didnt work. I also tried changing my system language to English but that didnt help either.

xnl-h4ck3r commented 1 year ago

Could you try this one just in case this works? GAP2.txt

KarahanGuner commented 1 year ago

Sorry, still the same error.

xnl-h4ck3r commented 1 year ago

Hi. I'm sorry I'm struggling to work out the cause or solution of this error because I can't reproduce it muself :( When you install it, I assume you get that error on the "Errors" tab of the "Load Burp Extension" window? Is there anything on the "Output" tab (I want to see if the error is occuring before or after the text is written there)?

KarahanGuner commented 1 year ago

I solved the problem after reading this thread: https://forum.portswigger.net/thread/not-supporting-characters-in-extensions-c29438eb

The problem was with where I was putting the GAP.py file. In Turkish "New Folder" is "Yeni Klasör". It was giving this error because of the letter "ö" in the folder name. I just changed the folder's name and it was fixed.

xnl-h4ck3r commented 1 year ago

Interesting! I'm glad you figured it out :) Let me know if you have any other questions to issues Many thanks Xnl