!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/doc/popularity-contest/examples/bin/   drwxr-xr-x
Free 13.1 GB of 57.97 GB (22.6%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     popcon-process.sh (2.52 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/bin/sh

BASEDIR=/srv/popcon.debian.org/popcon-mail
MAILDIR=$BASEDIR/../Mail
WEBDIR=$BASEDIR/../www
LOGDIR=$BASEDIR/../logs
BINDIR=$BASEDIR/../bin
INCOMINGDIR=$BASEDIR/../incoming
DATADIR=$BASEDIR/popcon-entries
SUMMARYDIR=$BASEDIR/all-popcon-results
SUMMARYDIRSTABLE=$BASEDIR/all-popcon-results.stable

# set to 'true' if email submissions should be processed
READMAIL=true

# Remove entries older than # number of days
DAYLIMIT=20

set -e
cd $BASEDIR
umask 0002

# rotate incoming mail spool files
if [ true = "$READMAIL" ] ; then
    mv $MAILDIR/survey new-popcon-entries
    touch $MAILDIR/survey
    chmod go-rwx $MAILDIR/survey
fi
if true; then
    rm -fr popcon-gpg
    mkdir -m 770 popcon-gpg
    rm -fr $INCOMINGDIR/old
    mkdir -m 700 $INCOMINGDIR/old
fi

    # process entries, splitting them into individual reports
    (cd $INCOMINGDIR/new; find . -type f -exec mv -t ../old "{}" +)
    (cd $INCOMINGDIR/old; find . -type f -name '*.gz' -execdir gunzip "{}" \; ) 2> $LOGDIR/incoming.log
    (cd $INCOMINGDIR/old; find . -type f -execdir sh -c "(echo; echo From) >> {}" \; ) > $LOGDIR/incoming-end.log 2>&1
    find $INCOMINGDIR/old -type f -readable ! -empty  | xargs cat >> new-popcon-entries
    # All GPG files needs to be preprocessed at once...
    $BINDIR/prepop.pl <new-popcon-entries >$LOGDIR/prepop.out 2>&1
    #decrypt reports (to be parallelized)
    date >$LOGDIR/gpg.log
    find popcon-gpg -type f -name '*.gpg' -execdir gpg --multifile --decrypt {} \; >>$LOGDIR/gpg.log 2>&1
    date >>$LOGDIR/gpg.log
    #process decrypted reports
    find popcon-gpg -type f -name '*.txt' -exec $BINDIR/prepop.pl {} \; </dev/null >> $LOGDIR/prepop.out 2>&1

# delete outdated entries
rm -f results results.stable
find $DATADIR -type f -mtime +$DAYLIMIT -print0 | xargs -0 rm -f --

# Generate statistics
find $DATADIR -type f | xargs cat \
        | nice -15 $BINDIR/popanal.py >$LOGDIR/popanal.out 2>&1
cp results $WEBDIR/all-popcon-results
cp results.stable $WEBDIR/stable/stable-popcon-results
gzip -f $WEBDIR/all-popcon-results
gzip -f $WEBDIR/stable/stable-popcon-results
cp $WEBDIR/all-popcon-results.gz $SUMMARYDIR/popcon-`date +"%Y-%m-%d"`.gz
cp $WEBDIR/stable/stable-popcon-results.gz $SUMMARYDIRSTABLE/popcon-`date +"%Y-%m-%d"`.stable.gz

cd ../popcon-stat
find $SUMMARYDIR -type f -print | sort | $BINDIR/popcon-stat.pl ../www/stat>$LOGDIR/popstat.log 2>&1
find $SUMMARYDIRSTABLE -type f -print | sort | $BINDIR/popcon-stat.pl ../www/stable/stat >> $LOGDIR/popstat.log 2>&1

cd ../popcon-web
$BINDIR/popcon.pl >$LOGDIR/popcon.log 2>$LOGDIR/popcon.errors

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0052 ]--