⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
perl5
/
Mail
/
SPF
/
Mech
/
View File Name :
IP4.pm
# # Mail::SPF::Mech::IP4 # SPF record "ip4" mechanism class. # # (C) 2005-2012 Julian Mehnle
# 2005 Shevek
# $Id: IP4.pm 57 2012-01-30 08:15:31Z julian $ # ############################################################################## package Mail::SPF::Mech::IP4; =head1 NAME Mail::SPF::Mech::IP4 - SPF record C
mechanism class =cut use warnings; use strict; use base 'Mail::SPF::SenderIPAddrMech'; use constant TRUE => (0 == 0); use constant FALSE => not TRUE; use constant name => 'ip4'; use constant name_pattern => qr/${\name}/i; =head1 DESCRIPTION An object of class B
represents an SPF record mechanism of type C
. =head2 Constructors The following constructors are provided: =over =item B
: returns I
Creates a new SPF record C
mechanism object. %options is a list of key/value pairs representing any of the following options: =over =item B
=item B
See L
. =back =item B
: returns I
; throws I
, I
Creates a new SPF record C
mechanism object by parsing the string and any options given. =back =head2 Class methods The following class methods are provided: =over =item B
=item B
=item B
See L
. =item B
: returns I
Returns B<'ip4'>. =item B
: returns I
Returns a regular expression that matches a mechanism name of B<'ip4'>. =back See L
for other supported class methods. =head2 Instance methods The following instance methods are provided: =over =cut sub parse_params { my ($self) = @_; $self->parse_ipv4_network(TRUE); return; } =item B
=item B
=item B
=cut sub params { my ($self) = @_; my $params = ':' . $self->{ip_network}->addr; $params .= '/' . $self->{ip_network}->masklen if $self->{ip_network}->masklen != $self->default_ipv4_prefix_length; return $params; } =item B
See L
. =item B
: returns I
Returns the IP address network parameter of the mechanism. =cut # Make read-only accessors: __PACKAGE__->make_accessor($_, TRUE) foreach qw(ip_network ip_address ipv4_prefix_length); =item B
: returns I
Returns B
if the mechanism's C
equals or contains the given request's IP address, or B
otherwise. See RFC 4408, 5.6, for details. =cut sub match { my ($self, $server, $request) = @_; my $ip_network_v6 = $self->ip_network->version == 4 ? Mail::SPF::Util->ipv4_address_to_ipv6($self->ip_network) : $self->ip_network; return $ip_network_v6->contains($request->ip_address_v6); } =back =head1 SEE ALSO L
, L
, L
, L
L
For availability, support, and license information, see the README file included with Mail::SPF. =head1 AUTHORS Julian Mehnle
, Shevek
=cut TRUE;