Linux biogene 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1 (2020-06-09) x86_64
Apache
: 46.101.124.208 | : 18.117.170.203
Cant Read [ /etc/named.conf ]
5.6.40-0+deb8u12
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
sbin /
[ HOME SHELL ]
Name
Size
Permission
Action
a2disconf
13.84
KB
-rwxr-xr-x
a2dismod
13.84
KB
-rwxr-xr-x
a2dissite
13.84
KB
-rwxr-xr-x
a2enconf
13.84
KB
-rwxr-xr-x
a2enmod
13.84
KB
-rwxr-xr-x
a2ensite
13.84
KB
-rwxr-xr-x
a2query
9.66
KB
-rwxr-xr-x
accessdb
10.13
KB
-rwxr-xr-x
accton
10.2
KB
-rwxr-xr-x
acpid
46.8
KB
-rwxr-xr-x
add-shell
695
B
-rwxr-xr-x
addgnupghome
3.05
KB
-rwxr-xr-x
addgroup
33.66
KB
-rwxr-xr-x
adduser
33.66
KB
-rwxr-xr-x
amavis-mc
18.73
KB
-rwxr-xr-x
amavis-services
33.4
KB
-rwxr-xr-x
amavisd-agent
13.11
KB
-rwxr-xr-x
amavisd-nanny
11.72
KB
-rwxr-xr-x
amavisd-new
1.46
MB
-rwxr-xr-x
amavisd-new-cronjob
825
B
-rwxr-xr-x
amavisd-release
12.32
KB
-rwxr-xr-x
amavisd-signer
36.85
KB
-rwxr-xr-x
amavisd-snmp-subagent
52.97
KB
-rwxr-xr-x
amavisd-snmp-subagent-zmq
52.42
KB
-rwxr-xr-x
amavisd-status
14
KB
-rwxr-xr-x
amavisd-submit
9.09
KB
-rwxr-xr-x
apache2
650.93
KB
-rwxr-xr-x
apache2ctl
6.25
KB
-rwxr-xr-x
apachectl
6.25
KB
-rwxr-xr-x
applygnupgdefaults
2.21
KB
-rwxr-xr-x
arp
54.38
KB
-rwxr-xr-x
arpd
39.11
KB
-rwxr-xr-x
arping
30.48
KB
-rwxr-xr-x
aspell-autobuildhash
13.09
KB
-rwxr-xr-x
atd
21.88
KB
-rwxr-xr-x
biosdecode
18.76
KB
-rwxr-xr-x
check_forensic
952
B
-rwxr-xr-x
chgpasswd
57.3
KB
-rwxr-xr-x
chpasswd
49.36
KB
-rwxr-xr-x
chroot
34.6
KB
-rwxr-xr-x
cpgr
51.48
KB
-rwxr-xr-x
cppw
51.48
KB
-rwxr-xr-x
cron
43.36
KB
-rwxr-xr-x
dbconfig-generate-include
11.63
KB
-rwxr-xr-x
dbconfig-load-include
5.57
KB
-rwxr-xr-x
delgroup
15.43
KB
-rwxr-xr-x
deluser
15.43
KB
-rwxr-xr-x
dmidecode
98.43
KB
-rwxr-xr-x
dovecot
82.05
KB
-rwxr-xr-x
dpkg-divert
135.23
KB
-rwxr-xr-x
dpkg-preconfigure
3.52
KB
-rwxr-xr-x
dpkg-reconfigure
4.23
KB
-rwxr-xr-x
dpkg-statoverride
58.84
KB
-rwxr-xr-x
dump-acct
18.46
KB
-rwxr-xr-x
dump-utmp
14.4
KB
-rwxr-xr-x
e2freefrag
10.18
KB
-rwxr-xr-x
e4defrag
26.47
KB
-rwxr-xr-x
fdformat
10.21
KB
-rwxr-xr-x
filefrag
14.25
KB
-rwxr-xr-x
groupadd
57.36
KB
-rwxr-xr-x
groupdel
53.23
KB
-rwxr-xr-x
groupmod
67.73
KB
-rwxr-xr-x
grpck
53.35
KB
-rwxr-xr-x
grpconv
49.23
KB
-rwxr-xr-x
grpunconv
49.23
KB
-rwxr-xr-x
grub-bios-setup
751.6
KB
-rwxr-xr-x
grub-install
943.7
KB
-rwxr-xr-x
grub-macbless
739.26
KB
-rwxr-xr-x
grub-mkconfig
7.78
KB
-rwxr-xr-x
grub-mkdevicemap
188.83
KB
-rwxr-xr-x
grub-probe
749.2
KB
-rwxr-xr-x
grub-reboot
4.01
KB
-rwxr-xr-x
grub-set-default
3.48
KB
-rwxr-xr-x
httxt2dbm
9.96
KB
-rwxr-xr-x
iconvconfig
30.46
KB
-rwxr-xr-x
install-sgmlcatalog
4.44
KB
-rwxr-xr-x
invoke-rc.d
15.01
KB
-rwxr-xr-x
ip6tables-apply
6.85
KB
-rwxr-xr-x
iptables-apply
6.85
KB
-rwxr-xr-x
irqbalance
43.07
KB
-rwxr-xr-x
ispell-autobuildhash
15.25
KB
-rwxr-xr-x
laptop-detect
2.53
KB
-rwxr-xr-x
ldattach
22.35
KB
-rwxr-xr-x
locale-gen
1.5
KB
-rwxr-xr-x
logrotate
62.92
KB
-rwxr-xr-x
logwatch
57.19
KB
-rwxr-xr-x
make-ssl-cert
3.69
KB
-rwxr-xr-x
mkinitramfs
9.15
KB
-rwxr-xr-x
mklost+found
10.2
KB
-rwxr-xr-x
mount.davfs
123.61
KB
-rwsr-xr-x
mysqld
11.32
MB
-rwxr-xr-x
newusers
77.86
KB
-rwxr-xr-x
nfacct
14.2
KB
-rwxr-xr-x
nfnl_osf
14.18
KB
-rwxr-xr-x
nologin
5.87
KB
-rwxr-xr-x
ownership
10.13
KB
-rwxr-xr-x
p0f-analyzer
23.34
KB
-rwxr-xr-x
pam-auth-update
19.02
KB
-rwxr-xr-x
pam_getenv
2.82
KB
-rwxr-xr-x
pam_timestamp_check
10.2
KB
-rwxr-xr-x
paperconfig
4.07
KB
-rwxr-xr-x
php5dismod
6.21
KB
-rwxr-xr-x
php5enmod
6.21
KB
-rwxr-xr-x
php5query
5.05
KB
-rwxr-xr-x
pma-configure
299
B
-rwxr-xr-x
pma-secure
157
B
-rwxr-xr-x
postalias
17.87
KB
-rwxr-xr-x
postcat
17.94
KB
-rwxr-xr-x
postconf
163.38
KB
-rwxr-xr-x
postdrop
13.99
KB
-r-xr-sr-x
postfix
13.95
KB
-rwxr-xr-x
postfix-add-filter
4.88
KB
-rwxr-xr-x
postfix-add-policy
3.81
KB
-rwxr-xr-x
postkick
9.87
KB
-rwxr-xr-x
postlock
9.87
KB
-rwxr-xr-x
postlog
10.05
KB
-rwxr-xr-x
postmap
17.87
KB
-rwxr-xr-x
postmulti
30.26
KB
-rwxr-xr-x
postqueue
13.95
KB
-r-xr-sr-x
postsuper
26.26
KB
-rwxr-xr-x
posttls-finger
33.95
KB
-rwxr-xr-x
pwck
49.3
KB
-rwxr-xr-x
pwconv
45.17
KB
-rwxr-xr-x
pwunconv
36.36
KB
-rwxr-xr-x
qmqp-sink
13.87
KB
-rwxr-xr-x
qmqp-source
17.88
KB
-rwxr-xr-x
qshape
12.55
KB
-rwxr-xr-x
readprofile
14.33
KB
-rwxr-xr-x
remove-default-ispell
2.86
KB
-rwxr-xr-x
remove-default-wordlist
2.86
KB
-rwxr-xr-x
remove-shell
749
B
-rwxr-xr-x
rmail
13.87
KB
-rwxr-xr-x
rmt
54.91
KB
-rwxr-xr-x
rmt-tar
54.91
KB
-rwxr-xr-x
rsyslogd
563.81
KB
-rwxr-xr-x
rtcwake
26.42
KB
-rwxr-xr-x
sa
35.39
KB
-rwxr-xr-x
safe_finger
10.3
KB
-rwxr-xr-x
select-default-ispell
1.83
KB
-rwxr-xr-x
select-default-wordlist
1.82
KB
-rwxr-xr-x
sendmail
26.05
KB
-rwxr-xr-x
service
9.37
KB
-rwxr-xr-x
setvesablank
10.07
KB
-rwxr-xr-x
slapacl
1.21
MB
-rwxr-xr-x
slapadd
1.21
MB
-rwxr-xr-x
slapauth
1.21
MB
-rwxr-xr-x
slapcat
1.21
MB
-rwxr-xr-x
slapd
1.21
MB
-rwxr-xr-x
slapdn
1.21
MB
-rwxr-xr-x
slapindex
1.21
MB
-rwxr-xr-x
slappasswd
1.21
MB
-rwxr-xr-x
slapschema
1.21
MB
-rwxr-xr-x
slaptest
1.21
MB
-rwxr-xr-x
smtp-sink
30.8
KB
-rwxr-xr-x
smtp-source
21.89
KB
-rwxr-xr-x
spamd
127.49
KB
-rwxr-xr-x
split-logfile
2.36
KB
-rwxr-xr-x
sshd
760.63
KB
-rwxr-xr-x
tarcat
936
B
-rwxr-xr-x
tcpd
10.12
KB
-rwxr-xr-x
tcpdchk
22.42
KB
-rwxr-xr-x
tcpdmatch
18.33
KB
-rwxr-xr-x
tcptraceroute
1.45
KB
-rwxr-xr-x
tcptraceroute.db
1.45
KB
-rwxr-xr-x
traceroute
67.37
KB
-rwxr-xr-x
try-from
10.06
KB
-rwxr-xr-x
tunelp
14.22
KB
-rwxr-xr-x
tzconfig
106
B
-rwxr-xr-x
umount.davfs
10.21
KB
-rwxr-xr-x
update-alternatives
46.43
KB
-rwxr-xr-x
update-ca-certificates
4.85
KB
-rwxr-xr-x
update-catalog
9.15
KB
-rwxr-xr-x
update-default-aspell
1
KB
-rwxr-xr-x
update-default-ispell
9.68
KB
-rwxr-xr-x
update-default-wordlist
7.5
KB
-rwxr-xr-x
update-dictcommon-aspell
1
KB
-rwxr-xr-x
update-dictcommon-hunspell
782
B
-rwxr-xr-x
update-grub
64
B
-rwxr-xr-x
update-grub2
64
B
-rwxr-xr-x
update-icon-caches
617
B
-rwxr-xr-x
update-info-dir
1.65
KB
-rwxr-xr-x
update-initramfs
8.76
KB
-rwxr-xr-x
update-locale
2.99
KB
-rwxr-xr-x
update-mime
8.84
KB
-rwxr-xr-x
update-passwd
30.31
KB
-rwxr-xr-x
update-pciids
2.84
KB
-rwxr-xr-x
update-python-modules
19.33
KB
-rwxr-xr-x
update-rc.d
11.72
KB
-rwxr-xr-x
update-xmlcatalog
16.28
KB
-rwxr-xr-x
upgrade-from-grub-legacy
1.49
KB
-rwxr-xr-x
useradd
118.69
KB
-rwxr-xr-x
userdel
81.92
KB
-rwxr-xr-x
usermod
122.5
KB
-rwxr-xr-x
validlocale
1.73
KB
-rwxr-xr-x
vcstime
6.06
KB
-rwxr-xr-x
vigr
59.73
KB
-rwxr-xr-x
vipw
59.73
KB
-rwxr-xr-x
visudo
2.2
MB
-rwxr-xr-x
vpddecode
14.26
KB
-rwxr-xr-x
vsftpd
156.32
KB
-rwxr-xr-x
zabbix_agentd
527.59
KB
-rwxr-xr-x
zic
42.36
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : amavisd-release
#!/usr/bin/perl -T #------------------------------------------------------------------------------ # This is amavisd-release, an EXAMPLE quarantine release utility program. # It uses AM.PDP protocol to send a request to amavisd daemon to release # a quarantined mail message. # # Author: Mark Martinec <Mark.Martinec@ijs.si> # # Copyright (c) 2005-2014, Mark Martinec # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # The views and conclusions contained in the software and documentation are # those of the authors and should not be interpreted as representing official # policies, either expressed or implied, of the Jozef Stefan Institute. # (the above license is the 2-clause BSD license, also known as # a "Simplified BSD License", and pertains to this program only) # # Patches and problem reports are welcome. # The latest version of this program is available at: # http://www.ijs.si/software/amavisd/ #------------------------------------------------------------------------------ # Usage: # amavisd-release mail_file secret_id [alt_recip1 alt_recip2 ..] # # To be placed in amavisd.conf: # $interface_policy{'SOCK'} = 'AM.PDP'; # $policy_bank{'AM.PDP'} = { protocol=>'AM.PDP' }; # $unix_socketname = '/var/amavis/amavisd.sock'; # or: # $interface_policy{'9998'} = 'AM.PDP'; # $policy_bank{'AM.PDP'} = { protocol=>'AM.PDP' }; # $inet_socket_port = [10024,9998]; # # To obtain secret_id and quar_type belonging to some mail_id: # $ mysql mail_log -e \ # 'select secret_id,quar_type,content from msgs where mail_id="W+7uJyXUjw32"' # # If secret_id is not available, administrator may choose to skip checking # of secret_id in the amavisd daemon by setting a configuration variable # $auth_required_release to false (it defaults to true). If the release # client program specifies a nonempty secret_id in the request, the secret_id # will be validated and a request will fail if not valid, regardless of the # setting of $auth_required_release. Turning off a requirement for a valid # secret_id widens the right to release to anyone who can connect to amavisd # socket (Unix or inet). Access to the socket therefore needs to be restricted # using socket protection (unix socket) or @inet_acl (for inet socket). use warnings; use warnings FATAL => 'utf8'; no warnings 'uninitialized'; use strict; use re 'taint'; use IO::Socket; use Time::HiRes (); use vars qw($VERSION); $VERSION = 2.002; use vars qw($log_level $socketname $have_inet4 $have_inet6 $have_socket_ip); BEGIN { ### USER CONFIGURABLE: $log_level = 1; # $socketname = '127.0.0.1:9998'; $socketname = '/var/lib/amavis/amavisd.sock'; ### END OF USER CONFIGURABLE } BEGIN { # no need to load INET/INET6 modules when a socket is a Unix socket return if $socketname =~ m{^/}; # prefer using IO::Socket::IP if it exists, otherwise # fall back to IO::Socket::INET6 or IO::Socket::INET as appropriate # $have_socket_ip = eval { require IO::Socket::IP; }; $have_inet4 = # can we make a PF_INET socket? $have_socket_ip ? eval { my $sock = IO::Socket::IP->new(LocalAddr => '0.0.0.0', Proto => 'udp'); $sock->close or die "error closing inet6 socket: $!" if $sock; $sock ? 1 : undef; } : eval { require IO::Socket::INET; my $sock = IO::Socket::INET->new(LocalAddr => '0.0.0.0', Proto => 'udp'); $sock->close or die "error closing inet socket: $!" if $sock; $sock ? 1 : undef; }; $have_inet6 = # can we make a PF_INET6 socket? $have_socket_ip ? eval { my $sock = IO::Socket::IP->new(LocalAddr => '::', Proto => 'udp'); $sock->close or die "error closing inet6 socket: $!" if $sock; $sock ? 1 : undef; } : eval { require IO::Socket::INET6; my $sock = IO::Socket::INET6->new(LocalAddr => '::', Proto => 'udp'); $sock->close or die "error closing inet6 socket: $!" if $sock; $sock ? 1 : undef; }; 1; } # end BEGIN sub sanitize_str { my($str, $keep_eol) = @_; my(%map) = ("\r" => '\\r', "\n" => '\\n', "\f" => '\\f', "\t" => '\\t', "\b" => '\\b', "\e" => '\\e', "\\" => '\\\\'); if ($keep_eol) { $str =~ s/([^\012\040-\133\135-\176])/ # and \240-\376 ? exists($map{$1}) ? $map{$1} : sprintf(ord($1)>255 ? '\\x{%04x}' : '\\%03o', ord($1))/eg; } else { $str =~ s/([^\040-\133\135-\176])/ # and \240-\376 ? exists($map{$1}) ? $map{$1} : sprintf(ord($1)>255 ? '\\x{%04x}' : '\\%03o', ord($1))/eg; } $str; } sub ll($) { my($level) = @_; $level <= $log_level; } sub do_log($$;@) { my($level, $errmsg, @args) = @_; if ($level <= $log_level) { $errmsg = sprintf($errmsg,@args) if @args; print STDERR sanitize_str($errmsg)."\n"; # ignoring I/O status } } sub proto_decode($) { my($str) = @_; $str =~ s/%([0-9a-fA-F]{2})/pack("C",hex($1))/eg; $str; } sub proto_encode($@) { my($attribute_name,@strings) = @_; local($1); $attribute_name =~ # encode all but alfanumerics, '_' and '-' s/([^0-9a-zA-Z_-])/sprintf("%%%02x",ord($1))/eg; for (@strings) { # encode % and nonprintables s/([^\041-\044\046-\176])/sprintf("%%%02x",ord($1))/eg; } $attribute_name . '=' . join(' ',@strings); } sub ask_amavisd($$) { my($sock,$query_ref) = @_; my(@encoded_query) = map { /^([^=]+)=(.*)\z/s; proto_encode($1,$2) } @$query_ref; do_log(2,'> '.$_) for @encoded_query; $sock->print( map { $_."\015\012" } (@encoded_query,'') ) or die "Can't write response to socket: $!"; $sock->flush or die "Can't flush on socket: $!"; my(%attr); local($1,$2,$3); local($/) = "\015\012"; # set line terminator to CRLF # must not use \r and \n, which may not be \015 and \012 on certain platforms do_log(2,"waiting for response"); while(<$sock>) { last if /^\015\012\z/; # end of response if (/^ ([^=\000\012]*?) (=|:[ \t]*) ([^\012]*?) \015\012 \z/xsi) { my $attr_name = proto_decode($1); my $attr_val = proto_decode($3); if (!exists $attr{$attr_name}) { $attr{$attr_name} = [] } push(@{$attr{$attr_name}}, $attr_val); } } if (!defined($_) && $! != 0) { die "read from socket failed: $!" } \%attr; } sub release_file($$$@) { my($sock,$mail_file,$secret_id,@alt_recips) = @_; my($fn_path,$fn_prefix,$mail_id,$fn_suffix,$part_tag); local($1,$2,$3,$4); $part_tag = $1 if $mail_file =~ s/ \[ ( [^\]]* ) \] \z//xs; if ($mail_file =~ m{^ ([^/].*/)? ([A-Z0-9][A-Z0-9._-]*[_-])? ([A-Z0-9][A-Z0-9_+-]{10,14}[A-Z0-9]) (\.gz)? \z}xsi) { ($fn_path,$fn_prefix,$mail_id,$fn_suffix) = ($1,$2,$3,$4); } elsif ($mail_file =~ m{^ ([^/].*/)? () ([A-Za-z0-9$._=+-]+?) (\.gz)?\z}xs){ ($fn_path,$fn_prefix,$mail_id,$fn_suffix) = ($1,$2,$3,$4); # old style } else { usage("Invalid quarantine ID: $mail_file"); } my $quar_type = $fn_suffix eq '.gz' ? 'Z' : $fn_path ne '' ? 'F' : ''; my $request_type = $0 =~ /\breport\z/i ? 'report' : $0 =~ /\brequeue\z/i ? 'requeue' : 'release'; my(@query); push(@query, "request=$request_type"); push(@query, "mail_id=$mail_id"); push(@query, "quar_type=$quar_type") if $quar_type ne ''; push(@query, "secret_id=$secret_id") if $secret_id ne ''; push(@query, "mail_file=$mail_file"); # ignored with an SQL quarantine push(@query, "partition_tag=$part_tag") if $part_tag ne ''; if (@alt_recips) { # override original recipients if list is nonempty push(@query, map {"recipient=$_"} @alt_recips); } my $attr_ref = ask_amavisd($sock,\@query); $attr_ref && %$attr_ref or die "Invalid response received"; if (ll(2)) { for my $attr_name (keys %$attr_ref) { for my $attr_val (@{$attr_ref->{$attr_name}}) { do_log(2,"< %s=%s", $attr_name,$attr_val); } } } do_log(0,$_) for (@{$attr_ref->{'setreply'}}); # may do another release request on the same session if needed ... } sub usage(;$) { my($msg) = @_; print STDERR $msg,"\n\n" if $msg ne ''; my $prog = $0; $prog =~ s{^.*/(?=[^/]+\z)}{}; print STDERR "$prog version $VERSION\n"; die "Usage: \$ $prog mail_file [secret_id [alt_recip1 alt_recip2 ...]]\n". " or to read request lines from stdin: \$ $prog -\n"; } # Main program starts here my($sock,$mail_file,$secret_id); @ARGV >= 1 or usage("Not enough arguments"); $mail_file = shift(@ARGV); # quarantine file id or '-' if ($mail_file eq '-') { @ARGV==0 or usage("Extra arguments after '-'") } my($peeraddress, $peerport, $is_inet); local($1,$2,$3); if ($socketname =~ m{^/}) { # simpleminded: unix vs. inet $is_inet = 0; } elsif ($socketname =~ /^(?: \[ ([^\]]*) \] | ([^:]*) ) : ([^:]*)/sx) { $peeraddress = defined $1 ? $1 : $2; $peerport = $3; $is_inet = 1; } elsif ($socketname =~ /^(?: \[ ([^\]]*) \] | ([0-9a-fA-F.:]+) ) \z/sx) { $peeraddress = defined $1 ? $1 : $2; $is_inet = 1; } else { # probably a syntax error, but let's assume it is a Unix socket $is_inet = 0; } if (!$is_inet) { # unix socket do_log(3,"connecting to a UNIX socket %s", $socketname); $sock = IO::Socket::UNIX->new(Type => SOCK_STREAM); $sock or die "Can't create UNIX socket: $!"; $sock->connect( pack_sockaddr_un($socketname) ) or die "Can't connect to UNIX socket $socketname: $!"; } else { # inet socket $peerport or die "port number not specified in \$socketname: $socketname\n"; my $module = $have_socket_ip ? 'IO::Socket::IP' : $have_inet4 && (!$have_inet6 || $peeraddress=~/^\d+\.\d+\.\d+\.\d+\z/) ? 'IO::Socket::INET' : 'IO::Socket::INET6'; my(%args) = (Type => SOCK_STREAM, Proto => 'tcp', PeerAddr => $peeraddress, PeerPort => $peerport); do_log(3,"connecting using %s to [%s]:%s", $module, $peeraddress, $peerport); if ($have_socket_ip) { # $module eq 'IO::Socket::IP' # inet or inet6 socket, let IO::Socket::IP handle dirty details $sock = IO::Socket::IP->new(%args); # note: the IO::Socket::IP constructor provides error message in $@ $sock or die "Can't connect to socket $socketname using $module: $@\n"; } elsif ($module eq 'IO::Socket::INET') { # inet socket (IPv4) $sock = IO::Socket::INET->new(%args); $sock or die "Can't connect to socket $socketname using $module: $!\n"; } else { # inet6 socket: no inet or IPv6 or unknown addr family $sock = IO::Socket::INET6->new(%args); $sock or die "Can't connect to socket $socketname using $module: $!\n"; } } if ($mail_file eq '-') { undef $!; while (<>) { # read from STDIN: mail_file [secret_id [alt_recips...]] chomp; next if /^[ \t]*(#.*)?$/; # skip empty lines or comments my($mail_file, $secret_id, @alt_recips) = split(' '); release_file($sock,$mail_file,$secret_id,@alt_recips); } $!==0 or die "Error reading from STDIN: $!"; } else { # assume empty secret_id if the second arg looks like an e-mail addr $secret_id = $ARGV[0]=~/\@/ ? '' : shift(@ARGV); release_file($sock,$mail_file,$secret_id,@ARGV); } $sock->close or die "Error closing socket: $!"; close(STDIN) or die "Error closing STDIN: $!"; close(STDOUT) or die "Error closing STDOUT: $!"; close(STDERR) or die "Error closing STDERR: $!";
Close