I've implemented two really silly functions on radare for supporting wide 
character
strings. Yeah! I know that some of you have been anoyed by the CHAR\x00CHAR 
strings.

These strings are mostly used on w32 environments and some UNICODE formats. Now
you can write wide strings using the 'ww' command (write wide):

  [0x00000000000000]> ww hello worm
        offset      0 1  2 3  4 5  6 7  8 9  A B  C D  E F   0123456789ABCDEF
  .---------------+----------------------------------------+-----------------.
  0x00000000000000 6800 6500 6c00 6c00 6f00 2000 7700 6f00   h.e.l.l.o. .w.o.
  0x00000000000010 7200 6d00                                 r.m.            

Write this 20 bytes buffer 1 times (aka 20)? (y/N)

I've also implemented a command to print wide strings (pZ) print wide char Zero 
terminated:

  [0x00000000000000]> pZ
  hello worm

The rule to print these strings is:

  for(i=0;i<len && (buf[i]&&!buf[i+1]);i+=2)
      printf("%c", buf[i]);

Have pron!

  --pancake
_______________________________________________
radare mailing list
[email protected]
https://lists.nopcode.org/mailman/listinfo/radare

Reply via email to