> Some strings are wider than normal...
This challenge has a binary that uses a simple `strcmp` to check the flag. Whenrunning the program, the following output is visible:
```sh# ./wstringsWelcome to flag checker 1.0.Give me a flag>```
My first stategy was running the `strings` utility on the `wstrings` binary,but I didn't find the flag. What was interesting to me though was that I alsocouldn't find the prompt text... This immediately made me check for otherstring encodings.
Running the `strings` utility with the `-eL` flag tells `strings` to look for32-bit little-endian encoded strings, and lo and behold the flag shows up!
This is because ascii strings are less 'wide' than 32-bit strings:
```          --- ascii ---
hex -> 0x68 0x65 0x6c 0x6c 0x6fstr -> h    e    l    l    o```
Notice how each character is represented by a single byte each (8 bits) inascii, as opposed to 32-bit characters in 32-bit land.
```        --- 32-bit land ---
hex -> 0x00000068 0x00000065 0x0000006c 0x0000006c 0x0000006fstr -> h          e          l          l          o```
I think 32-bit strings also have practical use for things like non-englishtexts such as hebrew, chinese or japanese. Those characters take up more spaceanyways, and you would waste less space by not using unicode escape characters.