CTF-quality code, fair warning :) Posting it before I forget this time.
Couple thoughts before merging:
This should be a superset of #7
I removed the .encode('ascii', 'ignore') in a few places, IIRC think the newer API wanted strings or something? Or else it was already bytes? Either way, I'm not sure if the 'ascii' was there to protect other tools that may not handle Unicode, so maybe we'd need a different fix.
Random question for the future - Binja has both structures and "types". A struct can be either. The "type" comes from parsing C, the "struct" comes from creating it via individual member UI interactions.
Not sure how we would go about syncing a type change, as idk what the API might be for that. It may or may not give us individual changes :/
I might poke at that at some point, figured I'd see if you have any thoughts before I do that?
CTF-quality code, fair warning :) Posting it before I forget this time.
Couple thoughts before merging:
.encode('ascii', 'ignore')
in a few places, IIRC think the newer API wanted strings or something? Or else it was already bytes? Either way, I'm not sure if the'ascii'
was there to protect other tools that may not handle Unicode, so maybe we'd need a different fix.Random question for the future - Binja has both structures and "types". A struct can be either. The "type" comes from parsing C, the "struct" comes from creating it via individual member UI interactions.
Not sure how we would go about syncing a type change, as idk what the API might be for that. It may or may not give us individual changes :/
I might poke at that at some point, figured I'd see if you have any thoughts before I do that?