Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 18.119.126.168
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/lib/dpkg/info/ufw.config
#!/bin/sh -e

# debconf
. /usr/share/debconf/confmodule
db_version 2.0

CONFFILE="/etc/ufw/ufw.conf"
USER_PATH="/lib/ufw"
TEMPLATE_PATH="/usr/share/ufw"

has_existing() {
    if [ ! -e "$USER_PATH/user.rules" ]; then
        return 1
    fi

    orig=`md5sum $TEMPLATE_PATH/user.rules | cut -d ' ' -f 1`
    orig_md5file="$TEMPLATE_PATH/user.rules.md5sum"
    user=`md5sum $USER_PATH/user.rules | cut -d ' ' -f 1`
    orig6=`md5sum $TEMPLATE_PATH/user6.rules | cut -d ' ' -f 1`
    orig6_md5file="$TEMPLATE_PATH/user6.rules.md5sum"
    user6=`md5sum $USER_PATH/user6.rules | cut -d ' ' -f 1`

    if [ "$orig" != "$user" ] && ! grep -q "$user" "$orig_md5file" 2>/dev/null ; then
        return 0
    elif [ "$orig6" != "$user6" ] && ! grep -q "$user6" "$orig6_md5file" 2>/dev/null ; then
        return 0
    else
        return 1
    fi
}

# https://bugs.launchpad.net/ufw/+bug/400208
OLD_USER_PATH="/var/lib/ufw"
if dpkg --compare-versions "$2" lt 0.28-1 ; then
    test -d $USER_PATH || mkdir $USER_PATH
    for f in user.rules user6.rules
    do
        test -f $OLD_USER_PATH/$f && mv -f $OLD_USER_PATH/$f $USER_PATH/$f
    done
fi

# If ufw is enabled (eg during an upgrade), then update debconf
if [ -f "$CONFFILE" ]; then
    if egrep -q '^ENABLED=yes$' "$CONFFILE" ; then
        db_set ufw/enable true || true
    else
        db_set ufw/enable false || true
    fi
fi

db_get ufw/enable
previous="$RET"

db_input medium ufw/enable || true
db_go

db_get ufw/enable
# only use existing_configuration/allow_known_ports if the user changed from
# false to true
if [ ! -z "$RET" ] && [ "$previous" = "false" ] && [ "$RET" = true ]; then
    if has_existing ; then
        # Can't reliably configure ports in an existing configuration
        db_text low ufw/existing_configuration || true
        db_go
    else
        db_input medium ufw/allow_known_ports || true
        db_go
        db_input low ufw/allow_custom_ports || true
        db_go
    fi
fi

Anon7 - 2022
AnonSec Team