| 1 | package YaraFFI::Record::YR_STRING; | ||
| 2 | |||
| 3 | 1 | $YaraFFI::Record::YR_STRING::VERSION = '0.07'; | |
| 4 | 1 | $YaraFFI::Record::YR_STRING::AUTHORITY = 'cpan:MANWAR'; | |
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | YaraFFI::Record::YR_STRING - FFI Record for YARA string structure | ||
| 9 | |||
| 10 | =head1 VERSION | ||
| 11 | |||
| 12 | Version 0.07 | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | use YaraFFI::Record::YR_STRING; | ||
| 17 | |||
| 18 | # Cast string pointer to record | ||
| 19 | my $string = $ffi->cast('opaque', 'record(YaraFFI::Record::YR_STRING)*', $str_ptr); | ||
| 20 | |||
| 21 | # Access identifier | ||
| 22 | my $id_ptr = $string->identifier; | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | Represents the YR_STRING structure from YARA's libyara. This is a partial | ||
| 27 | definition focusing on the identifier field we need to access. | ||
| 28 | |||
| 29 | =head1 STRUCTURE FIELDS | ||
| 30 | |||
| 31 | =over 4 | ||
| 32 | |||
| 33 | =item identifier (opaque) | ||
| 34 | |||
| 35 | Pointer to the string identifier (e.g., "$a", "$suspicious") | ||
| 36 | |||
| 37 | =back | ||
| 38 | |||
| 39 | =cut | ||
| 40 | |||
| 41 | 1 | ▶ | use v5.14; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 42 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 43 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 44 | 1 | ▶ | use FFI::Platypus::Record; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 45 | |||
| 46 | # Partial definition - only the first field we need | ||
| 47 | 1 | record_layout_1( | |
| 48 | opaque => 'identifier', # Pointer to string identifier | ||
| 49 | ); | ||
| 50 | |||
| 51 | 1 | 1; # End of YaraFFI::Record::YR_STRING | |