over
=item $archive_ext->TO_JSON
Helper for JSON encoders.
=item $archive_ext->to_hash
Return the object HASH.
=item $archive_ext->to_string
Encode the object in JSON.
=item $archive_ext->valid
ate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
at L<htt
t SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/user-account.json';
use constant PROPERTIES => (
qw(type id),
qw(spec_version o
r
=item $user_account->TO_JSON
Encode the object in JSON.
=item $user_account->to_hash
Return the object HASH.
=item $user_account->to_string
Encode the object in JSON.
=item $user_account->val
idate
Validate the object using JSON Schema
(see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
at L<h
::Mail::ESMTP;
use JSON::PP ();
use Exporter qw< import >;
our @EXPORT_OK = qw<
mojo_ioloop_server_callback_factory
>;
our %EXPORT_TAGS = (all => \@EXPORT_OK);
sub _encode_json_pretty ($data) {
state $encoder = JSON::PP->new->ascii->canonical->pretty;
return $encoder->encode($data);
}
sub _require_class_module ($module) {
require_module($module) unless $module->can('new');
return
$log->trace(_encode_json_pretty($call_sequence))
if $log->is_trace;
$out eq 'accept';
}
catch {
my $e = $_;
$log->error(_encode_json_pretty($e->data));
u
html_unordered_list
html_ordered_list
build_time
section_start
section_end
div_script
html_menu
json_menu
>;
our @EXPORT=@EXPORT_OK;
sub html_unordered_list {
"<ul>"
.(Template::Plex::jmap
pairs $level->%*;
}
sub json_menu {
my ($nav, $url_table, $object)=@_;
my $first;
unless(defined $object){
$first=1;
$object={};
}
#Convert hash structure into json
#_data becomes data (
TO_JSON
Helper for JSON encoders.
=item $tcp_ext->to_hash
Return the object HASH.
=item $tcp_ext->to_string
Encode the object in JSON.
=item $tcp_ext->validate
Validate the object using JSON Sc
ant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/sdos/malware-analysis.json';
use constant PROPERTIES => (
qw(type spec_version id created mod
$malware_analysis->TO_JSON
Encode the object in JSON.
=item $malware_analysis->to_hash
Return the object HASH.
=item $malware_analysis->to_string
Encode the object in JSON.
=item $malware_analy
sis->validate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracke
O_JSON
Helper for JSON encoders.
=item $ntfs_ext->to_hash
Return the object HASH.
=item $ntfs_ext->to_string
Encode the object in JSON.
=item $ntfs_ext->validate
Validate the object using JSON
ant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/artifact.json';
use constant PROPERTIES => (
qw(type id),
qw(spec_version obj
_JSON
Encode the object in JSON.
=item $artifact->to_hash
Return the object HASH.
=item $artifact->to_string
Encode the object in JSON.
=item $artifact->validate
Validate the object using JSON
h qw<mkpath>;
use File::Copy;
use Data::Dumper;
use Template::Plex;
use Template::Plexsite;
use JSON;
#use GetOpt::Long;
use feature ":all";
my $html_root="site";
#Takes a list or multiple input
:json_menu \%nav, \%url_table;
my $json_menu=encode_json $menu;
#write to site as menu file?
my $fh;
my $file=$html_root."/menu.json";
unless(open $fh, ">", $file){
warn "Could not create menu.json
file $file";
}
print $fh $json_menu;
close $fh;
m $raster_image_ext->TO_JSON
Helper for JSON encoders.
=item $raster_image_ext->to_hash
Return the object HASH.
=item $raster_image_ext->to_string
Encode the object in JSON.
=item $raster_image_
ext->validate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracke
SCHEMA =>
'https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/marking-definition.json#/definitions/tlp_green';
has +id => (is => 'ro', defaul
$tlp->TO_JSON
Helper for JSON encoders.
=item $tlp->to_hash
Return the object HASH.
=item $tlp->to_string
Encode the object in JSON.
=item $tlp->validate
Validate the object using JSON Schema (
m $unix_account_ext->TO_JSON
Helper for JSON encoders.
=item $unix_account_ext->to_hash
Return the object HASH.
=item $unix_account_ext->to_string
Encode the object in JSON.
=item $unix_account_
ext->validate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracke
_pe_binary_ext->TO_JSON
Helper for JSON encoders.
=item $windows_pe_binary_ext->to_hash
Return the object HASH.
=item $windows_pe_binary_ext->to_string
Encode the object in JSON.
=item $windows_
pe_binary_ext->validate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the is
SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/x509-certificate.json#/definitions/x509-v3-extensions-type';
use constant PROPERTIES => (
nsions_type->TO_JSON
Encode the object in JSON.
=item $x509_v3_extensions_type->to_hash
Return the object HASH.
=item $x509_v3_extensions_type->to_string
Encode the object in JSON.
=item $x509_v
3_extensions_type->validate
Validate the object using JSON Schema
(see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through th
=over
=item $socket_ext->TO_JSON
Helper for JSON encoders.
=item $socket_ext->to_hash
Return the object HASH.
=item $socket_ext->to_string
Encode the object in JSON.
=item $socket_ext->validat
dows_process_ext->TO_JSON
Helper for JSON encoders.
=item $windows_process_ext->to_hash
Return the object HASH.
=item $windows_process_ext->to_string
Encode the object in JSON.
=item $windows_pr
ocess_ext->validate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue
TO_JSON
Helper for JSON encoders.
=item $pdf_ext->to_hash
Return the object HASH.
=item $pdf_ext->to_string
Encode the object in JSON.
=item $pdf_ext->validate
Validate the object using JSON Sc
tant SCHEMA =>
'https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/file.json#/definitions/windows-pe-optional-header-type';
use constant PROPERTIES =>
type->TO_JSON
Helper for JSON encoders.
=item $windows_pe_optional_header_type->to_hash
Return the object HASH.
=item $windows_pe_optional_header_type->to_string
Encode the object in JSON.
=item
$windows_pe_optional_header_type->validate
Validate the object using JSON Schema (see L<STIX::Schema>).
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature req
SCHEMA =>
'https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/marking-definition.json#/definitions/tlp_red';
has +id => (is => 'ro', default
$tlp->TO_JSON
Helper for JSON encoders.
=item $tlp->to_hash
Return the object HASH.
=item $tlp->to_string
Encode the object in JSON.
=item $tlp->validate
Validate the object using JSON Schema (
constant SCHEMA =>
'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/sdos/tool.json';
use constant PROPERTIES => (
qw(type spec_version id created modified)
ol->TO_JSON
Encode the object in JSON.
=item $tool->to_hash
Return the object HASH.
=item $tool->to_string
Encode the object in JSON.
=item $tool->validate
Validate the object using JSON Schema