NAME

STIX::Observable::File - STIX Cyber-observable Object (SCO) - File

SYNOPSIS

use STIX::Observable::File;

my $file = STIX::Observable::File->new();

DESCRIPTION

The File Object represents the properties of a file.

METHODS

STIX::Observable::File inherits all methods from STIX::Observable and implements the following new ones.

STIX::Observable::File->new(%properties)

Create a new instance of STIX::Observable::File.

$file->atime

Specifies the date/time the file was last accessed.

$file->contains_refs

Specifies a list of references to other Observable Objects contained within the file.

$file->content_ref

Specifies the content of the file, represented as an Artifact Object.

$file->ctime

Specifies the date/time the file was created.

$file->extensions

The File Object defines the following extensions. In addition to these, producers MAY create their own. Extensions: ntfs-ext, raster-image-ext, pdf-ext, archive-ext, windows-pebinary-ext

$file->hashes

Specifies a dictionary of hashes for the file.

$file->id
$file->magic_number_hex

Specifies the hexadecimal constant ('magic number') associated with a specific file format that corresponds to the file, if applicable.

$file->mime_type

Specifies the MIME type name specified for the file, e.g., 'application/msword'.

$file->mtime

Specifies the date/time the file was last written to/modified.

$file->name

Specifies the name of the file.

$file->name_enc

Specifies the observed encoding for the name of the file.

$file->parent_directory_ref

Specifies the parent directory of the file, as a reference to a Directory Object.

$file->size

Specifies the size of the file, in bytes, as a non-negative integer.

$file->type

The value of this property MUST be file.

HELPERS

$file->TO_JSON

Encode the object in JSON.

$file->to_hash

Return the object HASH.

$file->to_string

Encode the object in JSON.

$file->validate

Validate the object using JSON Schema (see STIX::Schema).

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/giterlizzi/perl-STIX/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/giterlizzi/perl-STIX

git clone https://github.com/giterlizzi/perl-STIX.git

AUTHOR

  • Giuseppe Di Terlizzi <gdt@cpan.org>

LICENSE AND COPYRIGHT

This software is copyright (c) 2024 by Giuseppe Di Terlizzi.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.