diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index aa4a2d744c..bbca6968aa 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231214 +Version: 7.0NG.774-231215 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 5230283cd9..c954d505ef 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.774-231214" +pandora_version="7.0NG.774-231215" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index eea0bef2e7..359e76ee0a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231214'; +use constant AGENT_BUILD => '231215'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 77dd456483..c9549e3c9b 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231214 +%define release 231215 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index d6170ca2e8..0925353598 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231214 +%define release 231215 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 81de81c240..e1c50546ee 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231214 +%define release 231215 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 7e3809eec3..4e7907ea9d 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231214 +%define release 231215 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 6babe4a929..85ce06d693 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231214 +%define release 231215 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 6635b0c2e4..2001864650 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231214" +PI_BUILD="231215" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2849d5842a..38d741d818 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231214} +{231215} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d5c47e9441..d827c111a9 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.774 Build 231214") +#define PANDORA_VERSION ("7.0NG.774 Build 231215") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a7398b0f13..8eee99167d 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231214))" + VALUE "ProductVersion", "(7.0NG.774(Build 231215))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 03471ff471..6fbf3cd46e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231214 +Version: 7.0NG.774-231215 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 92a964b48a..c5fbbd0727 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.774-231214" +pandora_version="7.0NG.774-231215" package_pear=0 package_pandora=1 diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index c1057af585..bb1617d001 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -764,6 +764,16 @@ $table->data[$i++][] = html_print_label_input_block( ) ); +$table->data[$i][] = html_print_label_input_block( + __('Easter eggs'), + html_print_checkbox_switch( + 'eastern_eggs_disabled', + 1, + $config['eastern_eggs_disabled'], + true + ) +); + echo '
'; diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9ad1aa52da..1a8f8f6cd9 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC231214'; +$build_version = 'PC231215'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 0f55153922..9eb19be28d 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -367,6 +367,10 @@ function config_update_config() $error_update[] = __('show_experimental_features'); } + if (config_update_value('eastern_eggs_disabled', get_parameter('eastern_eggs_disabled'), true) === false) { + $error_update[] = __('eastern_eggs_disabled'); + } + if (config_update_value('number_modules_queue', get_parameter('number_modules_queue'), true) === false) { $error_update[] = __('number_modules_queue'); } @@ -2453,6 +2457,10 @@ function config_process_config() config_update_value('number_modules_queue', 500); } + if (!isset($config['eastern_eggs_disabled'])) { + config_update_value('eastern_eggs_disabled', 1); + } + if (!isset($config['agent_vulnerabilities'])) { config_update_value('agent_vulnerabilities', 1); } diff --git a/pandora_console/include/lib/TacticalView/elements/LogStorage.php b/pandora_console/include/lib/TacticalView/elements/LogStorage.php index 427b3c93c6..6ff1276394 100644 --- a/pandora_console/include/lib/TacticalView/elements/LogStorage.php +++ b/pandora_console/include/lib/TacticalView/elements/LogStorage.php @@ -170,7 +170,7 @@ class LogStorage extends Element public function getStoredData():string { if ($this->isEnabled() === true) { - $data = $this->valueMonitoring('Total lines of data'); + $data = $this->valueMonitoring('Total documents'); $value = format_numeric($data[0]['datos']); } else { $value = __('N/A'); diff --git a/pandora_console/index.php b/pandora_console/index.php index 4ca8f80a82..49bccd1b14 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1515,6 +1515,15 @@ echo html_print_div( true ); +echo html_print_input_hidden( + 'flagEasternEgg', + $config['eastern_eggs_disabled'], + false, + '', + '', + 'flagEasternEgg' +); + // Connection lost alert. set_js_value('check_conexion_interval', $config['check_conexion_interval']); set_js_value('title_conexion_interval', __('Connection with console has been lost')); diff --git a/pandora_console/install.php b/pandora_console/install.php index 1864d06ed2..6ff3a4eb0b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
connect(); - $result_server = db_get_all_rows_sql($sql); + $result_server = db_get_all_rows_sql($sql); - if (empty($result_server) === false) { - // Create HASH login info. - $pwd = $server['auth_token']; - $auth_serialized = json_decode($pwd, true); + if (empty($result_server) === false) { + // Create HASH login info. + $pwd = $server['auth_token']; + $auth_serialized = json_decode($pwd, true); - if (is_array($auth_serialized)) { - $pwd = $auth_serialized['auth_token']; - $api_password = $auth_serialized['api_password']; - $console_user = $auth_serialized['console_user']; - $console_password = $auth_serialized['console_password']; + if (is_array($auth_serialized)) { + $pwd = $auth_serialized['auth_token']; + $api_password = $auth_serialized['api_password']; + $console_user = $auth_serialized['console_user']; + $console_password = $auth_serialized['console_password']; + } + + $user = $config['id_user']; + $user_rot13 = str_rot13($config['id_user']); + $hashdata = $user.$pwd; + $hashdata = md5($hashdata); + + foreach ($result_server as $result_element_key => $result_element_value) { + $result_server[$result_element_key]['server_id'] = $server['id']; + $result_server[$result_element_key]['server_name'] = $server['server_name']; + $result_server[$result_element_key]['server_url'] = $server['server_url'].'/'; + $result_server[$result_element_key]['hashdata'] = $hashdata; + $result_server[$result_element_key]['user'] = $config['id_user']; + $result_server[$result_element_key]['groups_in_server'] = agents_get_all_groups_agent( + $result_element_value['id_agent'], + $result_element_value['id_group'] + ); + + $count_modules++; + } + + $result = array_merge($result, $result_server); } - $user = $config['id_user']; - $user_rot13 = str_rot13($config['id_user']); - $hashdata = $user.$pwd; - $hashdata = md5($hashdata); - $url_hash = '&'.'loginhash=auto&'.'loginhash_data='.$hashdata.'&'.'loginhash_user='.$user_rot13; - - foreach ($result_server as $result_element_key => $result_element_value) { - $result_server[$result_element_key]['server_id'] = $server['id']; - $result_server[$result_element_key]['server_name'] = $server['server_name']; - $result_server[$result_element_key]['server_url'] = $server['server_url'].'/'; - $result_server[$result_element_key]['hashdata'] = $hashdata; - $result_server[$result_element_key]['user'] = $config['id_user']; - $result_server[$result_element_key]['groups_in_server'] = agents_get_all_groups_agent( - $result_element_value['id_agent'], - $result_element_value['id_group'] - ); - - $count_modules++; - } - - $result = array_merge($result, $result_server); + usort($result, arrayOutputSorting($sort, $fieldForSorting)); + } catch (\Exception $e) { + $node->disconnect(); + return; + } finally { + $node->disconnect(); } - - usort($result, arrayOutputSorting($sort, $fieldForSorting)); - - metaconsole_restore_db(); } if ($count_modules > $config['block_size']) { diff --git a/pandora_console/operation/network/network_usage_map.php b/pandora_console/operation/network/network_usage_map.php index 097241a610..2faadf4760 100644 --- a/pandora_console/operation/network/network_usage_map.php +++ b/pandora_console/operation/network/network_usage_map.php @@ -96,6 +96,7 @@ $date_init_less = (strtotime(date('Y/m/d')) - SECONDS_1DAY); $date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less)); $time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less)); $datetime_init = strtotime($date_init.' '.$time_init); +$default_date_netflow = false; if ($custom_date === '1') { if ($datetime_init >= $datetime_end) { $datetime_init = $date_init_less; @@ -137,6 +138,8 @@ if ($custom_date === '1') { $date_end = date('Y/m/d H:i:s'); $date_init = date('Y/m/d H:i:s', (strtotime($date_end) - $range)); $period = (strtotime($date_end) - strtotime($date_init)); + $top = 10; + $default_date_netflow = true; } $date_from = strtotime($date_init); @@ -336,7 +339,7 @@ ui_toggle( $has_data = false; -if ((bool) get_parameter('update_netflow', 1) === true) { +if ((bool) get_parameter('update_netflow', 1) === true || $default_date_netflow === true) { $map_data = netflow_build_map_data( $date_from, $date_to, diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 221717d3fe..c991baca63 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -6,7 +6,7 @@ %define debug_package %{nil} %define name pandorafms_console %define version 7.0NG.774 -%define release 231214 +%define release 231215 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 2ad566822c..8ae24a1a45 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -6,7 +6,7 @@ %define debug_package %{nil} %define name pandorafms_console %define version 7.0NG.774 -%define release 231214 +%define release 231215 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 0f9ab3ccad..1f361f37da 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.774 -%define release 231214 +%define release 231215 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_console/views/tacticalView/view.php b/pandora_console/views/tacticalView/view.php index 29b1c923fc..ae3eb3cc86 100644 --- a/pandora_console/views/tacticalView/view.php +++ b/pandora_console/views/tacticalView/view.php @@ -193,7 +193,7 @@
getStoredData(); ?> - +
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index fd95ec2981..d8a3838568 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.774-231214 +Version: 7.0NG.774-231215 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index e53e8e8333..d414a23d60 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.774-231214" +pandora_version="7.0NG.774-231215" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 7209ed0131..296771f7f5 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -46,7 +46,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.774"; -my $pandora_build = "231214"; +my $pandora_build = "231215"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 771fd75075..8a311fc159 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.774"; -my $pandora_build = "231214"; +my $pandora_build = "231215"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 08a0661437..3109a043df 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231214 +%define release 231215 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index cee1e6c579..aab88dca68 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231214 +%define release 231215 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index aed560fe90..b537662939 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231214" +PI_BUILD="231215" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index c08803df7c..42040bba40 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231214"; +my $version = "7.0NG.774 Build 231215"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index b59337f42d..ae0081273f 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.774 Build 231214"; +my $version = "7.0NG.774 Build 231215"; # save program name for logging my $progname = basename($0);