diff -uprN pi-hole-5.2.3/adlists.list pi-hole-5.2.3.cust/adlists.list --- pi-hole-5.2.3/adlists.list 1970-01-01 01:00:00.000000000 +0100 +++ pi-hole-5.2.3.cust/adlists.list 2021-01-17 09:50:54.335093850 +0100 @@ -0,0 +1,4 @@ +https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts +https://mirror1.malwaredomains.com/files/justdomains +https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt +https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt diff -uprN pi-hole-5.2.3/advanced/Scripts/database_migration/gravity-db.sh pi-hole-5.2.3.cust/advanced/Scripts/database_migration/gravity-db.sh --- pi-hole-5.2.3/advanced/Scripts/database_migration/gravity-db.sh 2021-01-15 20:45:55.000000000 +0100 +++ pi-hole-5.2.3.cust/advanced/Scripts/database_migration/gravity-db.sh 2021-01-17 09:50:54.275093294 +0100 @@ -10,7 +10,7 @@ # This file is copyright under the latest version of the EUPL. # Please see LICENSE file for your rights under this license. -readonly scriptPath="/etc/.pihole/advanced/Scripts/database_migration/gravity" +readonly scriptPath="/opt/pihole/database_migration/gravity" upgrade_gravityDB(){ local database piholeDir auditFile version diff -uprN pi-hole-5.2.3/advanced/Scripts/webpage.sh pi-hole-5.2.3.cust/advanced/Scripts/webpage.sh --- pi-hole-5.2.3/advanced/Scripts/webpage.sh 2021-01-15 20:45:55.000000000 +0100 +++ pi-hole-5.2.3.cust/advanced/Scripts/webpage.sh 2021-01-17 09:50:54.334093841 +0100 @@ -24,7 +24,7 @@ readonly gravityDBfile="/etc/pihole/grav readonly PI_HOLE_FILES_DIR="/etc/.pihole" # shellcheck disable=SC2034 # used in basic-install PH_TEST="true" -source "${PI_HOLE_FILES_DIR}/automated install/basic-install.sh" +source "/opt/pihole/basic-install.sh" coltable="/opt/pihole/COL_TABLE" if [[ -f ${coltable} ]]; then @@ -37,10 +37,6 @@ Example: pihole -a -p password Set options for the Admin Console Options: - -p, password Set Admin Console password - -c, celsius Set Celsius as preferred temperature unit - -f, fahrenheit Set Fahrenheit as preferred temperature unit - -k, kelvin Set Kelvin as preferred temperature unit -e, email Set an administrative contact address for the Block Page -h, --help Show this help dialog -i, interface Specify dnsmasq's interface listening behavior @@ -86,10 +82,6 @@ delete_dnsmasq_setting() { sed -i "/${1}/d" "${dnsmasqconfig}" } -SetTemperatureUnit() { - change_setting "TEMPERATUREUNIT" "${unit}" - echo -e " ${TICK} Set temperature unit to ${unit}" -} HashPassword() { # Compute password hash twice to avoid rainbow table vulnerability @@ -98,51 +90,6 @@ HashPassword() { echo "${return}" } -SetWebPassword() { - if [ "${SUDO_USER}" == "www-data" ]; then - echo "Security measure: user www-data is not allowed to change webUI password!" - echo "Exiting" - exit 1 - fi - - if [ "${SUDO_USER}" == "lighttpd" ]; then - echo "Security measure: user lighttpd is not allowed to change webUI password!" - echo "Exiting" - exit 1 - fi - - if (( ${#args[2]} > 0 )) ; then - readonly PASSWORD="${args[2]}" - readonly CONFIRM="${PASSWORD}" - else - # Prevents a bug if the user presses Ctrl+C and it continues to hide the text typed. - # So we reset the terminal via stty if the user does press Ctrl+C - trap '{ echo -e "\nNo password will be set" ; stty sane ; exit 1; }' INT - read -s -r -p "Enter New Password (Blank for no password): " PASSWORD - echo "" - - if [ "${PASSWORD}" == "" ]; then - change_setting "WEBPASSWORD" "" - echo -e " ${TICK} Password Removed" - exit 0 - fi - - read -s -r -p "Confirm Password: " CONFIRM - echo "" - fi - - if [ "${PASSWORD}" == "${CONFIRM}" ] ; then - # We do not wrap this in brackets, otherwise BASH will expand any appropriate syntax - hash=$(HashPassword "$PASSWORD") - # Save hash to file - change_setting "WEBPASSWORD" "${hash}" - echo -e " ${TICK} New password set" - else - echo -e " ${CROSS} Passwords don't match. Your password has not been changed" - exit 1 - fi -} - ProcessDNSSettings() { source "${setupVars}" @@ -337,14 +284,6 @@ SetDNSServers() { RestartDNS } -SetExcludeDomains() { - change_setting "API_EXCLUDE_DOMAINS" "${args[2]}" -} - -SetExcludeClients() { - change_setting "API_EXCLUDE_CLIENTS" "${args[2]}" -} - Poweroff(){ nohup bash -c "sleep 5; poweroff" &> /dev/null /dev/tcp/tricorder.pi-hole.net/9998) >/dev/null 2>&1; then - echo -e " ${CROSS} Unable to connect to Pi-hole's Tricorder server" - exit 1 - fi - - if command -v openssl &> /dev/null; then - openssl s_client -quiet -connect tricorder.pi-hole.net:9998 2> /dev/null < /dev/stdin - exit "$?" - else - echo -e " ${INFO} ${COL_YELLOW}Security Notice${COL_NC}: ${COL_WHITE}openssl${COL_NC} is not installed - Your debug log will be transmitted unencrypted via plain-text - There is a possibility that this could be intercepted by a third party - If you wish to cancel, press Ctrl-C to exit within 10 seconds" - secs="10" - while [[ "$secs" -gt "0" ]]; do - echo -ne "." - sleep 1 - : $((secs--)) - done - echo " " - nc tricorder.pi-hole.net 9999 < /dev/stdin - exit "$?" - fi -} updateCheckFunc() { "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$@" @@ -418,27 +334,16 @@ Whitelist/Blacklist Options: Debugging Options: -d, debug Start a debugging session - Add '-a' to automatically upload the log to tricorder.pi-hole.net - -f, flush Flush the Pi-hole log - -r, reconfigure Reconfigure or Repair Pi-hole subsystems - -t, tail View the live output of the Pi-hole log Options: - -a, admin Web interface options - Add '-h' for more info on Web Interface usage - -c, chronometer Calculates stats and displays to an LCD Add '-h' for more info on chronometer usage -g, updateGravity Update the list of ad-serving domains -h, --help, help Show this help dialog - -l, logging Specify whether the Pi-hole log should be used Add '-h' for more info on logging usage -q, query Query the adlists for a specified domain Add '-h' for more info on query usage - -up, updatePihole Update Pi-hole subsystems Add '--check-only' to exit script before update is performed. - -v, version Show installed versions of Pi-hole, Web Interface & FTL Add '-h' for more info on version usage - uninstall Uninstall Pi-hole from your system status Display the running status of Pi-hole subsystems enable Enable Pi-hole subsystems disable Disable Pi-hole subsystems @@ -446,8 +351,6 @@ Options: restartdns Full restart Pi-hole subsystems Add 'reload' to update the lists and flush the cache without restarting the DNS server Add 'reload-lists' to only update the lists WITHOUT flushing the cache or restarting the DNS server - checkout Switch Pi-hole subsystems to a different GitHub branch - Add '-h' for more info on checkout usage arpflush Flush information stored in Pi-hole's network tables"; exit 0 } @@ -481,24 +384,16 @@ case "${1}" in "--white-wild" | "white-wild" ) listFunc "$@";; "-d" | "debug" ) debugFunc "$@";; "-f" | "flush" ) flushFunc "$@";; - "-up" | "updatePihole" ) updatePiholeFunc "$@";; - "-r" | "reconfigure" ) reconfigurePiholeFunc;; "-g" | "updateGravity" ) updateGravityFunc "$@";; - "-c" | "chronometer" ) chronometerFunc "$@";; "-h" | "help" ) helpFunc;; - "-v" | "version" ) versionFunc "$@";; "-q" | "query" ) queryFunc "$@";; "-l" | "logging" ) piholeLogging "$@";; - "uninstall" ) uninstallFunc;; "enable" ) piholeEnable 1;; "disable" ) piholeEnable 0 "$2";; "status" ) statusFunc "$2";; "restartdns" ) restartDNS "$2";; "-a" | "admin" ) webpageFunc "$@";; "-t" | "tail" ) tailFunc;; - "checkout" ) piholeCheckoutFunc "$@";; - "tricorder" ) tricorderFunc;; - "updatechecker" ) updateCheckFunc "$@";; "arpflush" ) arpFunc "$@";; * ) helpFunc;; esac