Native Types¶
-
class
revenge.types.
Basic
[source]¶ Bases:
revenge.types.BasicBasic
-
property
js
¶ String that can be fed into js.
-
property
-
class
revenge.types.
BasicBasic
[source]¶ Bases:
object
-
property
memory
¶ Instantiate this type to an active memory location for getting and setting.
Examples
struct = types.Struct() struct.add_member('my_int', types.Int) struct.add_member('my_pointer', types.Pointer) struct.memory = 0x12345 # OR struct.memory = 'a.out:symb' # OR struct.memory = process.memory[<whatever>]
-
property
-
class
revenge.types.
Char
[source]¶ Bases:
revenge.types.Int8
-
type
= 'char'¶
-
-
class
revenge.types.
Double
[source]¶ Bases:
revenge.types.Float
-
ctype
= 'double'¶
-
sizeof
= 8¶
-
type
= 'double'¶
-
-
class
revenge.types.
Float
[source]¶ Bases:
revenge.types.FloatBasic
,float
-
ctype
= 'float'¶
-
property
js
¶
-
sizeof
= 4¶
-
type
= 'float'¶
-
-
class
revenge.types.
Int
[source]¶ Bases:
revenge.types.Int32
-
type
= 'int'¶
-
-
class
revenge.types.
Int16
[source]¶ Bases:
revenge.types.Basic
,int
-
ctype
= 'short'¶
-
sizeof
= 2¶
-
type
= 'int16'¶
-
-
class
revenge.types.
Int32
[source]¶ Bases:
revenge.types.Basic
,int
-
ctype
= 'int'¶
-
sizeof
= 4¶
-
type
= 'int32'¶
-
-
class
revenge.types.
Int64
[source]¶ Bases:
revenge.types.Basic
,int
-
ctype
= 'long'¶
-
property
js
¶ String that can be fed into js.
-
sizeof
= 8¶
-
type
= 'int64'¶
-
-
class
revenge.types.
Int8
[source]¶ Bases:
revenge.types.Basic
,int
-
ctype
= 'char'¶
-
sizeof
= 1¶
-
type
= 'int8'¶
-
-
class
revenge.types.
Long
[source]¶ Bases:
revenge.types.Int64
-
type
= 'long'¶
-
-
class
revenge.types.
Padding
(size)[source]¶ Bases:
revenge.types.BasicBasic
Defines the spacing between struct entries.
Example
struct = types.Struct() struct['one'] = types.Int8 struct['pad1'] = types.Padding(3) struct['two'] = types.Int16
-
class
revenge.types.
Pointer
[source]¶ Bases:
revenge.types.UInt64
-
ctype
= 'void *'¶
-
property
js
¶ String that can be fed into js.
-
property
sizeof
¶
-
type
= 'pointer'¶
-
-
class
revenge.types.
Short
[source]¶ Bases:
revenge.types.Int16
-
type
= 'short'¶
-
-
class
revenge.types.
StringUTF16
[source]¶ Bases:
revenge.types.BasicBasic
,str
-
property
js
¶
-
property
sizeof
¶
-
type
= 'utf16'¶
-
property
-
class
revenge.types.
StringUTF8
[source]¶ Bases:
revenge.types.BasicBasic
,str
-
ctype
= 'char *'¶
-
property
js
¶
-
property
sizeof
¶
-
type
= 'utf8'¶
-
-
class
revenge.types.
Struct
[source]¶ Bases:
revenge.types.Pointer
Defines a C structure.
Examples
# Create a struct my_struct = types.Struct() my_struct.add_member('member_1', types.Int) my_struct.add_member('pad1', types.Padding(1)) my_struct.add_member('member_2', types.Pointer) # Alternatively, add them IN ORDER via dict setter my_struct = types.Struct() my_struct['member_1'] = types.Int my_struct['member_2'] = types.Pointer # Use cast to bind your struct to a location my_struct = process.memory[0x12345].cast(my_struct) # Or set memory property directly my_struct.memory = process.memory[0x12345] # Read out the values my_struct['member_1'] my_struct['member_2'] # Write in some new values (this will auto-cast based on struct def) my_struct['member_1'] = 12 # Allocate a struct and use it in a function call my_struct = process.memory.alloc_struct(my_struct) process.memory[<some function>](types.Pointer(my_struct))
-
add_member
(name, value=None)[source]¶ Adds given member to the end of this current structure.
- Parameters
name (str) – Name of the Struct member
value (revenge.types.all_types) – Type and/or value for member.
Examples
s = revenge.types.Struct() s.add_member('my_int', revenge.types.Int(12)) # Or, just the definition s = revenge.types.Struct() s.add_member('my_int', revenge.types.Int)
-
property
members
¶
-
property
name
¶
-
property
sizeof
¶
-
-
class
revenge.types.
Telescope
(process, address=None, data=None)[source]¶ Bases:
revenge.types.BasicBasic
-
property
address
¶ Address of this variable.
- Type
int
-
property
description
¶ String representational description of this telescope.
- Type
str
-
property
memory_range
¶ Information about the memory range this is in.
-
property
next
¶ Next step in the telescope.
-
property
thing
¶ Whatever this part of the telescope is.
-
property
-
class
revenge.types.
UChar
[source]¶ Bases:
revenge.types.UInt8
-
type
= 'uchar'¶
-
-
class
revenge.types.
UInt
[source]¶ Bases:
revenge.types.UInt32
-
type
= 'uint'¶
-
-
class
revenge.types.
UInt16
[source]¶ Bases:
revenge.types.Basic
,int
-
ctype
= 'unsigned short'¶
-
sizeof
= 2¶
-
type
= 'uint16'¶
-
-
class
revenge.types.
UInt32
[source]¶ Bases:
revenge.types.Basic
,int
-
ctype
= 'unsigned int'¶
-
sizeof
= 4¶
-
type
= 'uint32'¶
-
-
class
revenge.types.
UInt64
[source]¶ Bases:
revenge.types.Basic
,int
-
ctype
= 'unsigned long'¶
-
property
js
¶ String that can be fed into js.
-
sizeof
= 8¶
-
type
= 'uint64'¶
-
-
class
revenge.types.
UInt8
[source]¶ Bases:
revenge.types.Basic
,int
-
ctype
= 'unsigned char'¶
-
sizeof
= 1¶
-
type
= 'uint8'¶
-
-
class
revenge.types.
ULong
[source]¶ Bases:
revenge.types.UInt64
-
type
= 'ulong'¶
-
-
class
revenge.types.
UShort
[source]¶ Bases:
revenge.types.UInt16
-
type
= 'ushort'¶
-