Closed Kkevsterrr closed 6 years ago
I assume you meant:
p[TCP].flags = 0x100
p.sprintf("%TCP.flags%")
This does not solve the issue, but necessary for the clarity of other potential readers. Looking into the issue now.
It is working now in the latest github commit. PyPI package not released yet. Please, take into account renaming of the python package. See the Readme.
Brief description
If packet flags are set randomly, if they are sprintf-ed to %TCP.flags%, an exception is thrown, even though every value for this field can be represented by flag letters.
Environment
How to reproduce
Actual result
Expected result
0x100 is 1000000000, which is the "NS" flag (https://tools.ietf.org/html/rfc3540). Any flag value that contains the N flag causes a 'string index out of range' error.
Related resources
Related resources: https://tools.ietf.org/html/rfc3540