| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package STIX::Observable::Extension::HTTPRequest; |
|
2
|
|
|
|
|
|
|
|
|
3
|
24
|
|
|
24
|
|
570
|
use 5.010001; |
|
|
24
|
|
|
|
|
116
|
|
|
4
|
24
|
|
|
24
|
|
159
|
use strict; |
|
|
24
|
|
|
|
|
61
|
|
|
|
24
|
|
|
|
|
748
|
|
|
5
|
24
|
|
|
24
|
|
125
|
use warnings; |
|
|
24
|
|
|
|
|
52
|
|
|
|
24
|
|
|
|
|
1491
|
|
|
6
|
24
|
|
|
24
|
|
180
|
use utf8; |
|
|
24
|
|
|
|
|
70
|
|
|
|
24
|
|
|
|
|
201
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
24
|
|
|
24
|
|
1296
|
use Types::Standard qw(Str InstanceOf Int HashRef); |
|
|
24
|
|
|
|
|
105
|
|
|
|
24
|
|
|
|
|
282
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
24
|
|
|
24
|
|
96565
|
use Moo; |
|
|
24
|
|
|
|
|
71
|
|
|
|
24
|
|
|
|
|
204
|
|
|
11
|
24
|
|
|
24
|
|
11888
|
use namespace::autoclean; |
|
|
24
|
|
|
|
|
70
|
|
|
|
24
|
|
|
|
|
288
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
extends 'STIX::Object'; |
|
14
|
|
|
|
|
|
|
|
|
15
|
24
|
|
|
|
|
2249
|
use constant PROPERTIES => (qw[ |
|
16
|
|
|
|
|
|
|
request_method |
|
17
|
|
|
|
|
|
|
request_value |
|
18
|
|
|
|
|
|
|
request_version |
|
19
|
|
|
|
|
|
|
request_header |
|
20
|
|
|
|
|
|
|
message_body_length |
|
21
|
|
|
|
|
|
|
message_body_data_ref |
|
22
|
24
|
|
|
24
|
|
2921
|
]); |
|
|
24
|
|
|
|
|
65
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
24
|
|
|
24
|
|
192
|
use constant EXTENSION_TYPE => 'http-request-ext'; |
|
|
24
|
|
|
|
|
62
|
|
|
|
24
|
|
|
|
|
5256
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has request_method => (is => 'rw', required => 1, isa => Str); |
|
27
|
|
|
|
|
|
|
has request_value => (is => 'rw', required => 1, isa => Str); |
|
28
|
|
|
|
|
|
|
has request_version => (is => 'rw', isa => Str); |
|
29
|
|
|
|
|
|
|
has request_header => (is => 'rw', isa => HashRef); |
|
30
|
|
|
|
|
|
|
has message_body_length => (is => 'rw', isa => Int); |
|
31
|
|
|
|
|
|
|
has message_body_data_ref => (is => 'rw', isa => InstanceOf ['STIX::Observable::Artifact']); |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=encoding utf-8 |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
STIX::Observable::Extension::HTTPRequest - STIX Cyber-observable Object (SCO) - HTTP Request Extension |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
use STIX::Observable::Extension::HTTPRequest; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $http_request_ext = STIX::Observable::Extension::HTTPRequest->new(); |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
The HTTP request extension specifies a default extension for capturing network |
|
51
|
|
|
|
|
|
|
traffic properties specific to HTTP requests. |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 METHODS |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
L inherits all methods from L |
|
57
|
|
|
|
|
|
|
and implements the following new ones. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=over |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item STIX::Observable::Extension::HTTPRequest->new(%properties) |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Create a new instance of L. |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item $http_request_ext->request_method |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Specifies the HTTP method portion of the HTTP request line, as a lowercase string. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item $http_request_ext->request_value |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Specifies the value (typically a resource path) portion of the HTTP request line. |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item $http_request_ext->request_version |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Specifies the HTTP version portion of the HTTP request line, as a lowercase string. |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=item $http_request_ext->request_header |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Specifies all of the HTTP header fields that may be found in the HTTP client |
|
80
|
|
|
|
|
|
|
request, as a dictionary. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item $http_request_ext->message_body_length |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Specifies the length of the HTTP message body, if included, in bytes. |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item $http_request_ext->message_body_data_ref |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Specifies the data contained in the HTTP message body, if included. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 HELPERS |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=over |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item $http_request_ext->TO_JSON |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Helper for JSON encoders. |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item $http_request_ext->to_hash |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Return the object HASH. |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item $http_request_ext->to_string |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Encode the object in JSON. |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item $http_request_ext->validate |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Validate the object using JSON Schema (see L). |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=back |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 SUPPORT |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 Bugs / Feature Requests |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Please report any bugs or feature requests through the issue tracker |
|
121
|
|
|
|
|
|
|
at L. |
|
122
|
|
|
|
|
|
|
You will be notified automatically of any progress on your issue. |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 Source Code |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
This is open source software. The code repository is available for |
|
127
|
|
|
|
|
|
|
public review and contribution under the terms of the license. |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
L |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
git clone https://github.com/giterlizzi/perl-STIX.git |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 AUTHOR |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=over 4 |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item * Giuseppe Di Terlizzi |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=back |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
This software is copyright (c) 2024 by Giuseppe Di Terlizzi. |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
148
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=cut |