Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.117.91.170
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
Mail /
[ HOME SHELL ]
Name
Size
Permission
Action
Field
[ DIR ]
drwxr-xr-x
Mailer
[ DIR ]
drwxr-xr-x
Address.pm
6.66
KB
-rw-r--r--
Address.pod
3.71
KB
-rw-r--r--
Cap.pm
6.17
KB
-rw-r--r--
Cap.pod
3.74
KB
-rw-r--r--
Field.pm
4.68
KB
-rw-r--r--
Field.pod
4.9
KB
-rw-r--r--
Filter.pm
1.23
KB
-rw-r--r--
Filter.pod
2.79
KB
-rw-r--r--
Header.pm
14.02
KB
-rw-r--r--
Header.pod
7.72
KB
-rw-r--r--
Internet.pm
12
KB
-rw-r--r--
Internet.pod
10.31
KB
-rw-r--r--
Mailer.pm
4.73
KB
-rw-r--r--
Mailer.pod
3.88
KB
-rw-r--r--
Send.pm
1.13
KB
-rw-r--r--
Send.pod
2.8
KB
-rw-r--r--
Util.pm
3.14
KB
-rw-r--r--
Util.pod
3.08
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Mailer.pm
# Copyrights 1995-2016 by [Mark Overmeer <perl@overmeer.net>]. # For other contributors see ChangeLog. # See the manual pages for details on the licensing terms. # Pod stripped from pm file by OODoc 2.02. use strict; package Mail::Mailer; use vars '$VERSION'; $VERSION = '2.18'; use base 'IO::Handle'; use POSIX qw/_exit/; use Carp; use Config; sub is_exe($); sub Version { our $VERSION } our @Mailers = ( sendmail => '/usr/sbin/sendmail;/usr/lib/sendmail;/usr/ucblib/sendmail' , smtp => undef , smtps => undef , qmail => '/usr/sbin/qmail-inject;/var/qmail/bin/qmail-inject' , testfile => undef ); push @Mailers, map { split /\:/, $_, 2 } split /$Config{path_sep}/, $ENV{PERL_MAILERS} if $ENV{PERL_MAILERS}; our %Mailers = @Mailers; our $MailerType; our $MailerBinary; # does this really need to be done? or should a default mailer be specified? $Mailers{sendmail} = 'sendmail' if $^O eq 'os2' && ! is_exe $Mailers{sendmail}; if($^O =~ m/MacOS|VMS|MSWin|os2|NetWare/i ) { $MailerType = 'smtp'; $MailerBinary = $Mailers{$MailerType}; } else { for(my $i = 0 ; $i < @Mailers ; $i += 2) { $MailerType = $Mailers[$i]; if(my $binary = is_exe $Mailers{$MailerType}) { $MailerBinary = $binary; last; } } } sub import { shift; # class @_ or return; my $type = shift; my $exe = shift || $Mailers{$type}; is_exe $exe or carp "Cannot locate '$exe'"; $MailerType = $type; $Mailers{$MailerType} = $exe; } sub to_array($) { my ($self, $thing) = @_; ref $thing ? @$thing : $thing; } sub is_exe($) { my $exe = shift || ''; foreach my $cmd (split /\;/, $exe) { $cmd =~ s/^\s+//; # remove any options my $name = ($cmd =~ /^(\S+)/)[0]; # check for absolute or relative path return $cmd if -x $name && ! -d $name && $name =~ m![\\/]!; if(defined $ENV{PATH}) { foreach my $dir (split /$Config{path_sep}/, $ENV{PATH}) { return "$dir/$cmd" if -x "$dir/$name" && ! -d "$dir/$name"; } } } 0; } sub new($@) { my ($class, $type, @args) = @_; unless($type) { $MailerType or croak "No MailerType specified"; warn "No real MTA found, using '$MailerType'" if $MailerType eq 'testfile'; $type = $MailerType; } my $exe = $Mailers{$type}; if(defined $exe) { $exe = is_exe $exe if defined $type; $exe ||= $MailerBinary or croak "No mailer type specified (and no default available), thus can not find executable program."; } $class = "Mail::Mailer::$type"; eval "require $class" or die $@; my $glob = $class->SUPER::new; # object is a GLOB! %{*$glob} = (Exe => $exe, Args => [ @args ]); $glob; } sub open($) { my ($self, $hdrs) = @_; my $exe = *$self->{Exe}; # no exe, then direct smtp my $args = *$self->{Args}; my @to = $self->who_to($hdrs); my $sender = $self->who_sender($hdrs); $self->close; # just in case; if(defined $exe) { # Fork and start a mailer my $child = open $self, '|-'; defined $child or die "Failed to send: $!"; if($child==0) { # Child process will handle sending, but this is not real exec() # this is a setup!!! unless($self->exec($exe, $args, \@to, $sender)) { warn $!; # setup failed _exit(1); # no DESTROY(), keep it for parent } } } else { # Sending is handled by a subclass $self->exec(undef, $args, \@to) or die $!; } $self->set_headers($hdrs); $self; } sub _cleanup_hdrs($) { foreach my $h (values %{(shift)}) { foreach (ref $h ? @$h : $h) { s/\n\s*/ /g; s/\s+$//; } } } sub exec($$$$) { my($self, $exe, $args, $to, $sender) = @_; # Fork and exec the mailer (no shell involved to avoid risks) my @exe = split /\s+/, $exe; exec @exe, @$args, @$to; } sub can_cc { 1 } # overridden in subclass for mailer that can't sub who_to($) { my($self, $hdrs) = @_; my @to = $self->to_array($hdrs->{To}); unless($self->can_cc) # Can't cc/bcc so add them to @to { push @to, $self->to_array($hdrs->{Cc} ) if $hdrs->{Cc}; push @to, $self->to_array($hdrs->{Bcc}) if $hdrs->{Bcc}; } @to; } sub who_sender($) { my ($self, $hdrs) = @_; ($self->to_array($hdrs->{Sender} || $hdrs->{From}))[0]; } sub epilogue { # This could send a .signature, also see ::smtp subclass } sub close(@) { my $self = shift; fileno $self or return; $self->epilogue; CORE::close $self; } sub DESTROY { shift->close } 1;
Close