0

I am trying to find a simple hexeditor for simple string search. hexedit and bless are good candidates, however the string based panel (on the right) is mostly ASCII based.

I would like to search for strings in a very large binary file in a flexible way (I used iconv utf16le) to find some interesting one. But I would like now to find the offset in the file matching those strings.

I know I can search for K.E.R.N.E.L.B.A.S.E. instead of KERNELBASE but that sound ridiculous.

Is there a way to use vim + xxd ? Is there a plugin for bless ?

Community
  • 1
  • 1
malat
  • 12,152
  • 13
  • 89
  • 158

1 Answers1

1

You can just :edit ++bin ++enc=utf-16le filename, and use Vim's built-in search commands to locate the "interesting strings". Then, :echo line2byte('.') + col('.') - 2 will print the (0-based) byte offset of the cursor position.

You can also get a (1-based) offset into your 'statusline':

:set statusline+=\ %o
Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324