New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdfdump crashes with UnicodeEncodeError #4319
Comments
Thanks for your report. Can you share a single packet that reproduce the issue? |
|
Sorry, I cannot use this. Please share a pcap or something that we can reproduce.
|
Pcap is inside the example.zip |
Sorry, I haven't seen the zip file in the GitHub email. What's the fix that you propose? |
I propose to add some additional escaping somewhere in Packet.canvas_dump if isinstance(fval, str):
#HERE MAYBE?
if len(fval) > 18:
fval = fval[:18] + "[...]"
else:
fval = "" Changing PyX to unicode breaks LaTeX. |
I can't replicate. Your example.zip works just fine for me. |
Brief description
When dumping packets with random bytes the following happens:
It seems that texenc in pyx is set to default ASCII. If I change it to 'utf-8' everything works fine.
Scapy version
2.5.0
Python version
3.10
Operating system
Kubuntu 22.04
Additional environment information
No response
How to reproduce
This will eventually fail
Actual result
Exception
Expected result
A PDF
Related resources
No response
The text was updated successfully, but these errors were encountered: