AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/sendmail/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /usr/share/sendmail/update_tcpd
#!/bin/sh -e
#-----------------------------------------------------------------------------
#
# Update TCPD environment (TCP Wrappers) for sendmail
#
# Copyright (c) 2001-2001 Richard Nelson.  All Rights Reserved.
# Time-stamp: <2001/01/17 10:00:00 cowboy>
#
# Notes (to all):
#
# Notes (to self):
#
#-----------------------------------------------------------------------------
set -e

#------------------------------------------------------------------------------
# Check to see if sendmail is mentioned in /etc/hosts.allow
#	Note:  This check is far from perfect - it requires sendmail and : be
#		   on the same line.  If you've got a better approach, I'd love to
#		   see it (Maybe awk/perl)!

# Path to other sendmail helpers
if [ -x ./update_sendmail ]; then
	sm_path='.';
elif [ -x $(dirname $0)/update_sendmail ]; then
	sm_path=$(dirname $0);
else
	sm_path=/usr/share/sendmail;
	fi;
# Bring in sendmail.conf for the network definitions
if [ ! -f /etc/mail/sendmail.conf ]; then
	if [ -x $sm_path/update_conf ]; then
		$sm_path/update_conf;
		fi;
	fi;
if [ -f /etc/mail/sendmail.conf ]; then
	. /etc/mail/sendmail.conf;
	fi;
if [ "$HANDS_OFF" != 'No' ]; then
	exit 0;
	fi;

if grep -qEe "^[^#:]*sendmail[^:]*[:]" /etc/hosts.allow 2>/dev/null; then
	need_tcpd=0
else
	need_tcpd=1
	fi

if [ ! -e /etc/hosts.allow ]; then
	need_tcpd=0
	fi

if [ $need_tcpd -eq 1 ]; then
	cat <<-EOT

	Updating /etc/hosts.allow, adding "sendmail: all".

	Please edit /etc/hosts.allow and check the rules location to
	make sure your security measures have not been overridden -
	it is common to move the sendmail:all line to the *end* of
	the file, so your more selective rules take precedence.
EOT

	echo "sendmail: all" | cat - /etc/hosts.allow >/etc/hosts.allow.new
	mv -f /etc/hosts.allow.new /etc/hosts.allow

	if [ -e /etc/init.d/netbase ]; then
		/etc/init.d/netbase reload >/dev/null
	elif [ -e /etc/init.d/inetd ]; then
		/etc/init.d/inetd reload >/dev/null
		fi
	fi

exit 0

Anon7 - 2022
AnonSec Team