Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.145.69.185
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/bin/X11/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/bin/X11/dmarc_update_public_suffix_list
#!/usr/bin/perl 
use strict;
use warnings;

use Getopt::Long;
use HTTP::Tiny;
use Mail::DMARC;
use Pod::Usage;

my $dryrun = 0;
my $random = 0;

GetOptions (
    'dryrun' => \$dryrun,
    'help'   => \my $help,
    'random' => \$random,
    'config-file=s' => \my $config_file,
);

pod2usage if $help;

if ( $random ) {
    my $sleep_for = int(rand(60*60));
    sleep $sleep_for;
}

Mail::DMARC->new(
    (defined $config_file ? (config_file => $config_file) : ())
)->update_psl_file($dryrun);

__END__

=pod

=head1 NAME

dmarc_update_public_suffix_list - command line tool to download updated public suffix list

=head1 SYNOPSIS

  dmarc_update_public_suffix_list [ --option=value ]

=head1 DESCRIPTION

Downloads a new Public Suffix List to the location specified by /etc/mail-dmarc.ini

The PSL is maintained by the Mozilla Foundation. It is updated a few times per
month, you are requested to download no more than once per day.

The URL of the file is https://publicsuffix.org/list/effective_tld_names.dat
More details can be found at https://publicsuffix.org/

=head2 Options

  dmarc_update_public_suffix_list [ --dryrun --help ]

    dryrun       - show what would be done without overwriting file
    random       - introduce a random delay to spread server load
                   intended for use when running from crontab
    config-file  - alternate config file path
    help         - print this syntax guide

=head1 EXAMPLES

To check that a new file can be downloaded without error but not download the file:

  dmarc_update_public_suffix_list --dryrun

To download a new Public Suffix List to the location specified my mail-dmarc.ini

  dmarc_update_public_suffix_list

=head1 AUTHORS

=over 4

=item *

Matt Simerson <msimerson@cpan.org>

=item *

Davide Migliavacca <shari@cpan.org>

=item *

Marc Bradshaw <marc@marcbradshaw.net>

=back

=cut

Anon7 - 2022
AnonSec Team