mentebinaria / readpe

The PE file analysis toolkit
GNU General Public License v2.0
676 stars 128 forks source link

Fix UTF-16LE strings not being detected properly #188

Closed GoGoOtaku closed 1 year ago

GoGoOtaku commented 1 year ago

Instead of having a write buffer for pestr I track string starting positions for utf8/ascii, utf16 (odd start byte), and utf16(even start byte). I also do an explicit byte swap since C uses big endian but PE uses little endian. This might add more "fake" strings in the 1 to 2 character range but also stops these to interfere with other types of strings.

This fixes #142