The main decoding problem of this module was caused by picking ASCII-ish bytes from binary data randomly. clean_line and .replace(b"\x00", b"") were everywhere.
In fact, Unicode strings are stored as UTF-16LE, and ASCII strings are stored as Active CodePage that defined in each Windows machines. I added -c/--codepage option because we can't determine which code page was used for ASCII strings (I guess that's also why Unicode strings are also attached to LNK data structure)
The main decoding problem of this module was caused by picking ASCII-ish bytes from binary data randomly.
clean_line
and.replace(b"\x00", b"")
were everywhere.In fact, Unicode strings are stored as UTF-16LE, and ASCII strings are stored as Active CodePage that defined in each Windows machines. I added
-c/--codepage
option because we can't determine which code page was used for ASCII strings (I guess that's also why Unicode strings are also attached to LNK data structure)Thanks