No result when click PyCript
Have you gone through the Documentation or Video Tutorial
- Documentation - https://pycript.souravkalal.tech/
- Video - https://youtu.be/J8KE5VR8yDk?si=yr4XqqwWh5ms7O6s
- [Y/N] - Y
Describe the bug When I click PyScript, the page stays blank, although the logs look correct. Also, it takes a long time to switch to PyScript.
To Reproduce Steps to reproduce the behavior:
- Choose encryption and decryption file for request.
- Add http://192.168.0.1/ to scope
- Capture http package,
- Click pycriypt in history's request.
Screenshots
Desktop (please complete the following information):
- OS: [e.g.Windows11]
- BurpSuite Version [2025.1.1]
- PyCript Version [1.0]
Add any other context about the problem here.
Can you check few points?
- Any errors in PyCript Log Tab?
- Navigate to Extesion Tab in Burp Suite Select PyCript and check any error message in PyCript
- Can you show the PyCript Config Tab
- Can you confirm if you can manually run your encryption decryption scrpt outside PyCript from CMD/Terminal
Can you check few points?
- Any errors in PyCript Log Tab? No, there is no errors. I've attached logs and the log shows that the decrypted original_text is right.
- Navigate to Extesion Tab in Burp Suite Select PyCript and check any error message in PyCript Yes. There is a ValueError.This may be help.
- Can you show the PyCript Config Tab
- Can you confirm if you can manually run your encryption decryption scrpt outside PyCript from CMD/Terminal I guess the decryption script is ok cause the printed plaintext is right?
Can you confirm what data type your decryption python code write to file.
Can you confirm its byte array and not string or other output.
Can you confirm what data type your decryption python code write to file. The data type is <class 'int'>. The following is my script and log:
Can you confirm its byte array and not string or other output. so the problem is it should be byte not int?
Seems like extension is unable to convert the byte array to string again. In your python script can you remove .decode(utf8) for updated output byte variable
If that still raise error, the issue is with the extension, there seems to be multiple issues for byte string conversion.
You can try a temp fixed version of PyCript from below branch
https://github.com/Anof-cyber/PyCript/tree/ASCII-Error
You can try a temp fixed version of PyCript from below branch
https://github.com/Anof-cyber/PyCript/tree/ASCII-Error
Both ways cannot work. Remove .decode(utf8) will raise error.
May I know what type I should output? Mine is a list containing integers.
I printed the byte_data_clean in gethelpers.py:
It seems like the file wasn't read or parsed correctly.
Okay, i see there is error from extension or script to split body and headers.
- Can you confirm the body end marker variable in your script.
- Can you edit the https://github.com/Anof-cyber/PyCript/blob/221b91e0b14cc2cba970c5668dbfcce791b4a8a6/pycript/temp_file.py#L24 and print the body and confirm if after split body contains header or split has any errors.
I have validated with demo python scripts, extension is able to split body and headers perfectly.
Okay, i see there is error from extension or script to split body and headers.
- Can you confirm the body end marker variable in your script.
Can you edit the
[PyCript/pycript/temp_file.py](https://github.com/Anof-cyber/PyCript/blob/221b91e0b14cc2cba970c5668dbfcce791b4a8a6/pycript/temp_file.py#L24) Line 24 in [221b91e](/Anof-cyber/PyCript/commit/221b91e0b14cc2cba970c5668dbfcce791b4a8a6) body_data = parts[0]and print the body and confirm if after split body contains header or split has any errors.
The body_data seems right
Can you confirm the same with.
https://github.com/Anof-cyber/PyCript/blob/221b91e0b14cc2cba970c5668dbfcce791b4a8a6/pycript/decryption.py#L11
Yes. it is same
Sorry. I think the body_data didn't split in PyCript/pycript/temp_file.py
The body_data still contains body_end_marker and headers:
I find the root cuase. I changed the body_end_marker = b'\r\n--BODY_END--\r\n', then it worked. Thank you very much for your help.