Skip to content

Fix str/byte type errors#92

Merged
martingalloar merged 2 commits into
OWASP:masterfrom
DominikHolzapfel:master
Jul 1, 2026
Merged

Fix str/byte type errors#92
martingalloar merged 2 commits into
OWASP:masterfrom
DominikHolzapfel:master

Conversation

@DominikHolzapfel

Copy link
Copy Markdown
Contributor

While using https://github.com/SecuritySilverbacks/sncscan with this pysap library, I ran into an issue where TypeErrors were raised to due a mismatch between String and Bytes.
Scapy operates on byte buffers, and pysap sometimes returns a string.

I encountered it in StrEncodedPaddedField and fixed it similar to the sibling classes StrFixedLenPaddedField and StrNullFixedLenPaddedField.
In addition, there are two more spots in the code where a byte should be returned.

@martingalloar
martingalloar merged commit 6038367 into OWASP:master Jul 1, 2026
15 checks passed
@martingalloar

Copy link
Copy Markdown
Collaborator

Thanks @DominikHolzapfel! This looks good, I only added a test case to validate any potential regression, please report if there's any other issue running your tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants