Esempio n. 1
0
    raise NotImplementedError()

predefine("""
const int cBlack = 0x000000;
const int cRed = 0x0000ff;
const int cDkRed = 0x000080;
const int cLtRed = 0x8080ff;
const int cGreen = 0x00ff00;
const int cDkGreen = 0x008000;
const int cLtGreen = 0x80ff80;
const int cBlue = 0xff0000;
const int cDkBlue = 0x800000;
const int cLtBlue = 0xff8080;
const int cPurple = 0xff00ff;
const int cDkPurple = 0x800080;
const int cLtPurple = 0xffe0ff;
const int cAqua = 0xffff00;
const int cDkAqua = 0x808000;
const int cLtAqua = 0xffffe0;
const int cYellow = 0x00ffff;
const int cDkYellow = 0x008080;
const int cLtYellow = 0x80ffff;
const int cDkGray = 0x404040;
const int cGray = 0x808080;
const int cSilver = 0xc0c0c0;
const int cLtGray = 0xe0e0e0;
const int cWhite = 0xffffff;
const int cNone = 0xffffffff;
""")
#void SetBackColor( int color )
@native(name="SetBackColor", ret=pfp.fields.Void)
Esempio n. 2
0
import pfp.errors as errors
import pfp.fields
import pfp.utils as utils
import zlib

# http://www.sweetscape.com/010editor/manual/FuncTools.htm

predefine("""
    const int CHECKSUM_BYTE = 0; // Treats the file as a set of unsigned bytes
    const int CHECKSUM_SHORT_LE = 1; // Treats the file as a set of unsigned little-endian shorts
    const int CHECKSUM_SHORT_BE = 2; // Treats the file as a set of unsigned big-endian shorts
    const int CHECKSUM_INT_LE = 3; // Treats the file as a set of unsigned little-endian ints
    const int CHECKSUM_INT_BE = 4; // Treats the file as a set of unsigned big-endian ints
    const int CHECKSUM_INT64_LE = 5; // Treats the file as a set of unsigned little-endian int64s
    const int CHECKSUM_INT64_BE = 6; // Treats the file as a set of unsigned big-endian int64s
    const int CHECKSUM_SUM8 = 7; // Same as CHECKSUM_BYTE except result output as 8-bits
    const int CHECKSUM_SUM16 = 8; // Same as CHECKSUM_BYTE except result output as 16-bits
    const int CHECKSUM_SUM32 = 9; // Same as CHECKSUM_BYTE except result output as 32-bits
    const int CHECKSUM_SUM64 = 10; // Same as CHECKSUM_BYTE
    const int CHECKSUM_CRC16 = 11;
    const int CHECKSUM_CRCCCITT = 12;
    const int CHECKSUM_CRC32 = 13;
    const int CHECKSUM_ADLER32 = 14;
""")


#int64 Checksum(
#    int algorithm,
#    int64 start=0,
#    int64 size=0,
#    int64 crcPolynomial=-1,
Esempio n. 3
0
import pfp.errors as errors
import pfp.fields
import pfp.utils as utils
import zlib

# http://www.sweetscape.com/010editor/manual/FuncTools.htm

predefine("""
	const int CHECKSUM_BYTE = 0; // Treats the file as a set of unsigned bytes
	const int CHECKSUM_SHORT_LE = 1; // Treats the file as a set of unsigned little-endian shorts
	const int CHECKSUM_SHORT_BE = 2; // Treats the file as a set of unsigned big-endian shorts
	const int CHECKSUM_INT_LE = 3; // Treats the file as a set of unsigned little-endian ints
	const int CHECKSUM_INT_BE = 4; // Treats the file as a set of unsigned big-endian ints
	const int CHECKSUM_INT64_LE = 5; // Treats the file as a set of unsigned little-endian int64s
	const int CHECKSUM_INT64_BE = 6; // Treats the file as a set of unsigned big-endian int64s
	const int CHECKSUM_SUM8 = 7; // Same as CHECKSUM_BYTE except result output as 8-bits
	const int CHECKSUM_SUM16 = 8; // Same as CHECKSUM_BYTE except result output as 16-bits
	const int CHECKSUM_SUM32 = 9; // Same as CHECKSUM_BYTE except result output as 32-bits
	const int CHECKSUM_SUM64 = 10; // Same as CHECKSUM_BYTE
	const int CHECKSUM_CRC16 = 11;
	const int CHECKSUM_CRCCCITT = 12;
	const int CHECKSUM_CRC32 = 13;
	const int CHECKSUM_ADLER32 = 14;
""")
#int64 Checksum( 
#    int algorithm, 
#    int64 start=0, 
#    int64 size=0, 
#    int64 crcPolynomial=-1, 
#    int64 crcInitValue=-1 )
@native(name="Checksum", ret=pfp.fields.Int64)
Esempio n. 4
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module defines constants that don't fit into tool or inteferface
categories
"""

from pfp.native import predefine

predefine("""
    const int true = 1;
    const int True = 1;
    const int TRUE = 1;

    const int false = 0;
    const int False = 0;
    const int FALSE = 0;
""")
Esempio n. 5
0
	raise NotImplementedError()

predefine("""
const int cBlack = 0x000000;
const int cRed = 0x0000ff;
const int cDkRed = 0x000080;
const int cLtRed = 0x8080ff;
const int cGreen = 0x00ff00;
const int cDkGreen = 0x008000;
const int cLtGreen = 0x80ff80;
const int cBlue = 0xff0000;
const int cDkBlue = 0x800000;
const int cLtBlue = 0xff8080;
const int cPurple = 0xff00ff;
const int cDkPurple = 0x800080;
const int cLtPurple = 0xffe0ff;
const int cAqua = 0xffff00;
const int cDkAqua = 0x808000;
const int cLtAqua = 0xffffe0;
const int cYellow = 0x00ffff;
const int cDkYellow = 0x008080;
const int cLtYellow = 0x80ffff;
const int cDkGray = 0x404040;
const int cGray = 0x808080;
const int cSilver = 0xc0c0c0;
const int cLtGray = 0xe0e0e0;
const int cWhite = 0xffffff;
const int cNone = 0xffffffff;
""")
#void SetBackColor( int color )
@native(name="SetBackColor", ret=pfp.fields.Void)
Esempio n. 6
0
import sys

from pfp.native import native, predefine
import pfp.fields

# http://www.sweetscape.com/010editor/manual/FuncTools.htm

predefine("""
	const int CHECKSUM_BYTE = 0; // Treats the file as a set of unsigned bytes
	const int CHECKSUM_SHORT_LE = 1; // Treats the file as a set of unsigned little-endian shorts
	const int CHECKSUM_SHORT_BE = 2; // Treats the file as a set of unsigned big-endian shorts
	const int CHECKSUM_INT_LE = 3; // Treats the file as a set of unsigned little-endian ints
	const int CHECKSUM_INT_BE = 4; // Treats the file as a set of unsigned big-endian ints
	const int CHECKSUM_INT64_LE = 5; // Treats the file as a set of unsigned little-endian int64s
	const int CHECKSUM_INT64_BE = 6; // Treats the file as a set of unsigned big-endian int64s
	const int CHECKSUM_SUM8 = 7; // Same as CHECKSUM_BYTE except result output as 8-bits
	const int CHECKSUM_SUM16 = 8; // Same as CHECKSUM_BYTE except result output as 16-bits
	const int CHECKSUM_SUM32 = 9; // Same as CHECKSUM_BYTE except result output as 32-bits
	const int CHECKSUM_SUM64 = 10; // Same as CHECKSUM_BYTE
	const int CHECKSUM_CRC16 = 11;
	const int CHECKSUM_CRCCCITT = 12;
	const int CHECKSUM_CRC32 = 13;
	const int CHECKSUM_ADLER32 = 14;
""")
#int64 Checksum( 
#    int algorithm, 
#    int64 start=0, 
#    int64 size=0, 
#    int64 crcPolynomial=-1, 
#    int64 crcInitValue=-1 )
@native(name="Checksum", ret=pfp.fields.Int64)