Truxton etl create

From truxwiki.com
Revision as of 04:09, 26 May 2020 by Sam (talk | contribs) (Created page with "This is the first step in creating a Truxton exploitation process. It creates the ETL object. =Syntax= <syntaxhighlight lang="C"> uint64_t truxton_etl_create( void ); </synta...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the first step in creating a Truxton exploitation process. It creates the ETL object.

Syntax

uint64_t truxton_etl_create( void );

Sample

 1 #include <TruxtonCAPI.h>
 2 #pragma hdrstop
 3 
 4 void main( void )
 5 {
 6     char file_id[ 65 ];
 7 
 8     int exit_loop = 0;
 9 
10     uint64_t message = 0;
11     uint64_t app = truxton_etl_create();
12 
13     truxton_etl_set_application_name( app, "Sample C ETL" );
14     truxton_etl_set_stage_number( app, 42 );
15     truxton_etl_set_queue_name( app, "SampleC" );
16 
17     while( exit_loop == 0 )
18     {
19         message = truxton_etl_get_message( app );
20 
21         if ( message != 0 )
22         {
23             // Do something with the message
24 
25             memset( file_id, 0x00, sizeof( file_id ) );
26             truxton_message_get_file_id( message, file_id, sizeof( file_id ) );
27 
28             printf( "Received file id %s\n", file_id );
29 
30             truxton_message_destroy( message );
31         }
32         else
33         {
34             exit_loop = 1;
35         }
36     }
37 }