dorkhub

pfp-vim

A vim hex-editor plugin that uses 010 templates to parse binary data using pfp

d0c-s4vage
Python5810 forksMITupdated 6 years ago
git clone https://github.com/d0c-s4vage/pfp-vim.gitd0c-s4vage/pfp-vim

pfp-vim

A vim hex-editor plugin that uses 010 templates to parse binary data using pfp. Tested to work with vim versions that support python2 or python3.

Install pfp

Install pfp:

pip install --upgrade pfp

If you see errors that mention not being able to locate Python.h, install the python-dev package and try again:

sudo apt-get install python-dev

Install Plugin

Pathogen

Clone this repo into ~/.vim/bundle:

git clone https://github.com/d0c-s4vage/pfp-vim.git ~/.vim/bundle/pfp-vim

Use your vim plugin manager (pathogen, etc) to load the plugin (you probably already have this setup in your ~/.vimrc or something:

call pathogen#infect()

Vim Plug

Add Plug 'd0c-s4vage/pfp-vim' to your plug section

Usage

With a binary file loaded in the current window, the PfpParse command will parse the file.

You may be asked to specify a directory that contains your 010 templates (looks for *.bt files).

You will also be asked which template should be used to parse the binary file.

After choosing a template to use, a hex-view of the binary file will be displayed in a new tab on the left, with the parsed-out fields displayed on the right.

Navigating the data structure on the right will highlight the relevant bytes in the hex-view on the left

demo.gif

Notes

A PfpInit command also exists. This can be used to add additional directories within which 010 templates will be searched for.

TODO

  • Editing
  • Saving
  • Packed/Nested fields

more like this

vim-dap

Vim/Neovim debugger plugin providing a terminal interface to the Debug Adapter Protocol

Vim Script50

vim-halo

:innocent: Visual highlight for your cursor.

Vim script50

search

search projects, people, and tags