Difference between revisions of "Truxton Top Level Object"
(Created page with "This is the object that is created when you <code>import truxton</code> =Methods= ==<code>create()</code>== It will return a Truxton Object which is basic...") |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
=Methods= | =Methods= | ||
| − | ==<code> | + | ==<code>blackboxlocation(source_code_file_id: int, source_code_line_number: int) -> None</code>== |
| − | + | Sets a debugging location in the [[Black Box|black box]]. | |
| + | You must create a value to represent the name of your source code file. | ||
| + | When parsing the <code>DebugDump.xml</code>, you can translate that value back to the filename. | ||
| − | ==<code>etl()</code>== | + | ==<code>blackboxvalue(slot: int, value: int, source_code_file_id: int, source_code_line_number: int) -> None</code>== |
| − | This creates an [[TruxtonETL | ETL]] object to participate in exploitation. | + | Sets a debugging value in the [[Black Box|black box]]. |
| + | You have 20 debugging slots to store values. | ||
| + | <code>slot</code> can have a value between 0 and 19. | ||
| + | When parsing the <code>DebugDump.xml</code>, you can translate that value back to the filename. | ||
| + | |||
| + | ==<code>create() -> [[TruxtonObject]]</code>== | ||
| + | It will return a [[TruxtonObject|Truxton Object]] which is basically a connection to Truxton. | ||
| + | |||
| + | ==<code>details(file_type: int, buffer: bytes) -> str</code>== | ||
| + | This navigates the contents of a file of a given [[File Types Supported|type]] and produces [[Type_File_Details|details]] in a [https://en.wikipedia.org/wiki/JSON JSON] string. | ||
| + | |||
| + | ==<code>dumpblackbox(process_id: int) -> None</code>== | ||
| + | Dumps the [[Black Box|black box]] of the given process. | ||
| + | If the process has a black box, it will be written as XML to a file in the log file folder. | ||
| + | The name of the file will be a timestamp followed by the process id then 'DebugDump.xml' example: 20221231_145509_Process_1234_DebugDump.xml | ||
| + | |||
| + | ==<code>etl() -> [[TruxtonETL]]</code>== | ||
| + | This creates an [[TruxtonETL|ETL]] object to participate in exploitation. | ||
| + | |||
| + | ==<code>identify(buffer: bytes) -> int</code>== | ||
| + | This identifies the bytes as a [[File Types Supported|file type]]. | ||
| + | |||
| + | ==<code>options() -> [[TruxtonOptions]]</code>== | ||
| + | This creates an [[TruxtonOptions|Options]] object to retrieve configuration variables. | ||
| + | |||
| + | ==<code>parsetime(time_string: str) -> int</code>== | ||
| + | Parses the given string and returns an integer containing [https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime FILETIME] ticks. | ||
=Attributes= | =Attributes= | ||
There are hundreds of attributes to the object. | There are hundreds of attributes to the object. | ||
| − | ==<code>version</code>== | + | ==<code>version: str</code>== |
A string containing the version of Truxton this supports. | A string containing the version of Truxton this supports. | ||
==Defined Constants== | ==Defined Constants== | ||
| − | The same constants used for [[File Types Supported | file types]] and [[Developer's Guide#Data Types | other purposes]] are present in the Truxton top level object. | + | The same constants used for [[File Types Supported|file types]] and [[Developer's Guide#Data Types|other purposes]] are present in the Truxton top level object. |
Latest revision as of 18:07, 12 January 2023
This is the object that is created when you import truxton
Contents
- 1 Methods
- 1.1 blackboxlocation(source_code_file_id: int, source_code_line_number: int) -> None
- 1.2 blackboxvalue(slot: int, value: int, source_code_file_id: int, source_code_line_number: int) -> None
- 1.3 create() -> TruxtonObject
- 1.4 details(file_type: int, buffer: bytes) -> str
- 1.5 dumpblackbox(process_id: int) -> None
- 1.6 etl() -> TruxtonETL
- 1.7 identify(buffer: bytes) -> int
- 1.8 options() -> TruxtonOptions
- 1.9 parsetime(time_string: str) -> int
- 2 Attributes
Methods
blackboxlocation(source_code_file_id: int, source_code_line_number: int) -> None
Sets a debugging location in the black box.
You must create a value to represent the name of your source code file.
When parsing the DebugDump.xml, you can translate that value back to the filename.
blackboxvalue(slot: int, value: int, source_code_file_id: int, source_code_line_number: int) -> None
Sets a debugging value in the black box.
You have 20 debugging slots to store values.
slot can have a value between 0 and 19.
When parsing the DebugDump.xml, you can translate that value back to the filename.
create() -> TruxtonObject
It will return a Truxton Object which is basically a connection to Truxton.
details(file_type: int, buffer: bytes) -> str
This navigates the contents of a file of a given type and produces details in a JSON string.
dumpblackbox(process_id: int) -> None
Dumps the black box of the given process. If the process has a black box, it will be written as XML to a file in the log file folder. The name of the file will be a timestamp followed by the process id then 'DebugDump.xml' example: 20221231_145509_Process_1234_DebugDump.xml
etl() -> TruxtonETL
This creates an ETL object to participate in exploitation.
identify(buffer: bytes) -> int
This identifies the bytes as a file type.
options() -> TruxtonOptions
This creates an Options object to retrieve configuration variables.
parsetime(time_string: str) -> int
Parses the given string and returns an integer containing FILETIME ticks.
Attributes
There are hundreds of attributes to the object.
version: str
A string containing the version of Truxton this supports.
Defined Constants
The same constants used for file types and other purposes are present in the Truxton top level object.