pfp-vim


Ⅰ. 插件描述

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

Ⅱ. 基本信息

创建日期:  2015-07-10
使用用户:  1
Github星:  41
插件作者:  James Johnson

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'd0c-s4vage/pfp-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'd0c-s4vage/pfp-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'd0c-s4vage/pfp-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/d0c-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

添加新评论