• Stars
    star
    195
  • Rank 198,225 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

pfp - Python Format Parser - a python-based 010 Editor template interpreter

Master Build Status PyPI Statistics Latest Release Documentation Status Coverage Status

Twitter Follow

pfp

pfp is a python-based interpreter for 010 template scripts.

See the main documentation on Read the Docs

Contributing

See CONTRIBUTING.md

Installation

Install pfp with

pip install --upgrade pfp

Tl;DR

CLI

pfp -t path/to/template input_file

All available options for the pfp CLI:

usage: pfp [-h] -t TEMPLATE [--show-offsets] [-k] input

Run pfp on input data using a specified 010 Editor template for parsing

positional arguments:
  input                 The input data stream or file to parse. Use '-' for
                        piped data

optional arguments:
  -h, --help            show this help message and exit
  -t TEMPLATE, --template TEMPLATE
                        The template to parse with
  --show-offsets        Show offsets in the parsed data of parsed fields
  -k, --keep            Keep successfully parsed data on error

Python Library

This should get you started parsing something using 010 templates:

import pfp

dom = pfp.parse(
	data_file="~/Desktop/image.png",
	template_file="~/Desktop/PNGTemplate.bt"
)

More Repositories

1

lookatme

An interactive, terminal-based markdown presenter
Python
2,085
star
2

gramfuzz

gramfuzz is a grammar-based fuzzer that lets one define complex grammars to generate text and binary data formats.
Python
250
star
3

pfp-vim

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

py010parser

A modified pycparser to parse 010 templates
Python
52
star
5

bnarly

browser narlyness
JavaScript
50
star
6

pct-vim

Precise Code Tracking (Vim)
Vim Script
31
star
7

vim-morph

Simple vim plugin to handle file transformations (E.g. auto gpg/aes/etc encrypt/decrypt, base64 encode/decode, etc)
Vim Script
28
star
8

narly

Automatically exported from code.google.com/p/narly
C++
22
star
9

lookatme.contrib.image_ueberzug

An in-development lookatme extension that uses ueberzug and urwid_ueberzogen to add image rendering support
Python
16
star
10

lookatme.contrib.qrcode

lookatme extension that embeds qrcodes in the presentation
Python
7
star
11

my-superdots

My superdots plugin
Shell
6
star
12

lookatme.contrib.render

A lookatme extension that renders graphviz code blocks as images
Python
6
star
13

pipless

Simplifies the Python dev lifecycle by automagically: creating virtualenvs, installing packages, generating requirements
Python
5
star
14

superdots

Organized, usable, extendable dot files, utility, and configuration management
Shell
4
star
15

docker-bap

4
star
16

imagetext

Save text visually into an image
Python
2
star
17

lookatme.contrib.image_tiv

A lookatme extensions that renders images using tiv
1
star
18

gh_actions_test

Testing github actions again
1
star
19

pyactlab

Python
1
star
20

vmburn

A simple interface to immutable hard disks in VirtualBox that makes it easy to create and burn temporary vms.
1
star
21

lookatme.contrib-template

A cookiecutter template for new lookatme.contrib modules
Python
1
star