Difference between revisions of "Python"
Jump to navigation
Jump to search
| Line 59: | Line 59: | ||
=Classes= | =Classes= | ||
Truxton exposes several classes to Python. | Truxton exposes several classes to Python. | ||
| − | * [[TruxtonFileIO]] | + | * [[TruxtonFileIO]] - For working with a read-only file stored in Truxton. |
| − | * [[TruxtonChildFileIO]] | + | * [[TruxtonChildFileIO]] - For writing a file to Truxton. |
| − | * [[TruxtonETL]] | + | * [[TruxtonETL]] - For becoming a Truxton [https://en.wikipedia.org/wiki/Extract,_transform,_load ETL] process. |
| − | * [[TruxtonMessage]] | + | * [[TruxtonMessage]] - The way Truxton [https://en.wikipedia.org/wiki/Extract,_transform,_load ETL] processes communicate. |
| − | * [[TruxtonEvent]] | + | * [[TruxtonEvent]] - For adding records to the [[Event Table | Event table.]] |
| − | * [[TruxtonUrl]] | + | * [[TruxtonUrl]] - For adding records to the [[WebsiteVisit Table | WebsiteVisit table.]] |
| − | * [[TruxtonArtifact]] | + | * [[TruxtonArtifact]] - For adding records to the [[Entity Table | Entity table.]] |
| − | * [[TruxtonEXIF]] | + | * [[TruxtonEXIF]] - For adding records to the [[EXIF Table | EXIF table.]] |
| − | * [[TruxtonLocation]] | + | * [[TruxtonLocation]] - For adding geographic coordinates to the [[Location Table | Location table.]] |
| − | * [[TruxtonUSB]] | + | * [[TruxtonUSB]] - For adding records to the [[USBDevice Table | USBDevice table.]] |
| − | * [[TruxtonRelation]] | + | * [[TruxtonRelation]] - For adding records to the [[Relation Table | Relation table]] for relating two items in Truxton. |
| − | * [[TruxtonObject]] | + | * [[TruxtonObject]] - The object responsible for a connection to Truxton. |
Revision as of 13:44, 25 May 2020
Truxton supports Python 3.8 via the Truxton.pyd library.
You must use the "import" directive to load this.
Got to the C:\Program Files\Truxton\SDK folder and start Python.
import truxton
When you import truxton you will get all of the predefined constants for file type, data type, origins, locations,
messages, entities, relations, events, media, objects, url methods, and urls.
You can see them all by issuing a dir command.
>>> dir(truxton)
This will allow your Python code to use the same constant names as C, C++ and C# code.
>>> print(truxton.Type_JPEG)
203
>>> print(truxton.DATA_TYPE_BIG_ENDIAN_uint64_t)
39
>>> print(truxton.LOCATION_TYPE_EXIF)
9
>>> print(truxton.MESSAGE_TYPE_MIME)
1
>>> print(truxton.ENTITY_TYPE_MAC_ADDRESS)
4
>>> print(truxton.ORIGIN_GENERATED)
6
>>> print(truxton.RELATION_PASSWORD)
11
>>> print(truxton.EVENT_TYPE_FACEBOOK_LOGON)
21
>>> print(truxton.MEDIA_TYPE_HARD_DISK_IMAGE)
3
>>> print(truxton.OBJECT_TYPE_ENTITY)
7
>>> print(truxton.URL_METHOD_TYPE_GET)
7
>>> print(truxton.URL_TYPE_OPERA)
10
Once you have this working, you can start playing with Truxton.
import truxton
def main():
t = truxton.create()
print(t.version())
if __name__ == "__main__":
main()
Classes
Truxton exposes several classes to Python.
- TruxtonFileIO - For working with a read-only file stored in Truxton.
- TruxtonChildFileIO - For writing a file to Truxton.
- TruxtonETL - For becoming a Truxton ETL process.
- TruxtonMessage - The way Truxton ETL processes communicate.
- TruxtonEvent - For adding records to the Event table.
- TruxtonUrl - For adding records to the WebsiteVisit table.
- TruxtonArtifact - For adding records to the Entity table.
- TruxtonEXIF - For adding records to the EXIF table.
- TruxtonLocation - For adding geographic coordinates to the Location table.
- TruxtonUSB - For adding records to the USBDevice table.
- TruxtonRelation - For adding records to the Relation table for relating two items in Truxton.
- TruxtonObject - The object responsible for a connection to Truxton.