Module refinery.lib

Library functions used by various refinery units.

Expand source code Browse git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Library functions used by various refinery units.
"""

Sub-modules

refinery.lib.argformats

Multibin Syntax …

refinery.lib.argparser

Provides a customized argument parser that is used by all refinery Units.

refinery.lib.chunks

Routines to help interpret large binary buffers as arrays of numbers, stored as consecutive sequences of bytes, all with the same length and byte order.

refinery.lib.crypto

Primitives used in custom cryptographic implementations.

refinery.lib.decompression
refinery.lib.decorators

A selection of refinery-specific decorators.

refinery.lib.deobfuscation

Contains functions to aid in deobfuscation.

refinery.lib.dex

A rudimentary parser for Dalvik Executable (dex) files. The parser is not yet complete and currently only parses the string table, which is required …

refinery.lib.dotnet

A library to parse .NET headers and metadata.

refinery.lib.environment

A common interface to all binary refinery configuration settings available via environment variables. This module is also host to the logging …

refinery.lib.executable

This module implements an abstraction layer executable loader for PE, ELF, and MachO files. The provided interface is the same for all executables. It …

refinery.lib.frame

Some refinery units produce more than one output when applied to an input. For example, chop will chop the input data into evenly sized …

refinery.lib.inline

Implements programmatic inlining, specifically for the units in refinery.units.blockwise.

refinery.lib.java

Parsing of the Java Class file format as per the official specification.

refinery.lib.json

In order to represent arbitrary data as JSON, these classes help extend the built-in json module in order to support custom encoding of already …

refinery.lib.loader

Functions to help dynamically load refinery units.

refinery.lib.magic

A cross-platform interface to libmagic.

refinery.lib.meta

Inside a frame (see refinery.lib.frame), all chunks that are processed by refinery units have a dictionary of metadata attached to them. This …

refinery.lib.mime

File type related functions.

refinery.lib.mscrypto

Microsoft Crypto API structures

refinery.lib.murmur

Murmur hash implementation, orignally written by Fredrik Kihlander and enhanced by Swapnil Gusani.

refinery.lib.patterns

Library of regular expression patterns.

refinery.lib.powershell

Windows-specific module to determine whether the current Python process is running in a PowerShell process.

refinery.lib.ripemd128

Implementation of RIPEMD128 in pure Python.

refinery.lib.serpent

This implementation of the Serpent cipher is based on the original C reference implementation, available from the [official …

refinery.lib.structures

Interfaces and classes to read structured data.

refinery.lib.suffixtree

This module contains an implementation of Ukkonen's suffix tree algorithm.

refinery.lib.thirdparty

This module contains third-party libraries that usually have different licensing than Binary Refinery itself.

refinery.lib.tools

Miscellaneous helper functions.

refinery.lib.types

Exports two singletons INF and AST. Used by PatternExtractorBase as the default …

refinery.lib.vfs

Certain libraries insist on reading data from a file on disk which has to be specified by passing a file path, and sometimes they will not accept a …

refinery.lib.winclip

Windows-specific module to obtain data in different complex formats from the clipboard. Primarily, this can retrieve image data from the clipboard.

refinery.lib.xml

Custom XML parser that is intended to be less strict than the standard library one.