27 Commits
Author SHA1 Message Date
7ca0582b3c Refactor Perl scripts with Code Quality findings (#6594)
* add perl syntax checking for scripts

* Update .github/workflows/syntax.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* only show syntax errors

* Add support for ss

Fixed shell injection risk from piped netstat | grep by removing shell pipelines.
Added use strict; use warnings; and localized variables.
Added runtime fallback to ss when netstat is unavailable, with a clear failure when neither exists.

* Fix shell injection risk

apply fixes (safe open, strict/warnings, key whitelist, error handling).

* Update query_unix_partitions.pl

* Update unix_users.pl

add use strict/warnings  to flag issues
add better error handling

* Update weatherbug.pl

* add better suport for gree bsd

* Update loadavg.pl

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-01-31 20:25:42 -05:00
Luis Daniel Lucio Quiroz e5f84017d3 French support for ping.pl (#5770)
* Update ping.pl

* Numbers only
2024-06-12 23:52:28 -04:00
Alex b3a070fe49 Resolving Issue #1889 (#1900)
$ENV{ENV} which running on FreeBSD
2018-09-07 06:08:36 -05:00
cigamit 7970b871fe Resolving Issue #1889
Insecure $ENV{ENV} which running setgid
2018-09-06 21:31:00 -05:00
surfermarty 8546377e84 Update ping.pl (#1886)
* Update ping.pl

Changes to allow ping.pl to work with Solaris - 'ping' is in /usr/sbin which wasn't on the PATH, and the format of the ping command is different under Solaris.

* Update ping.pl

Removed the fork for the uname command
2018-09-02 11:05:43 -05:00
Matthew Horan eea6ab5c08 Handle udp host prefix and IPv6 equivalents (#1869)
The ping script does not currently work with a hostname prefix of `udp:`, `udp6:`, or `tcp6:`.
2018-08-24 17:18:21 -05:00
Matthew Horan 4063a44219 Support FreeBSD 11 ping error for IPv6 hosts (#1470)
FreeBSD 11 returns "No address associated with name" when ping is passed a hostname with only an AAAA record. Adding this to the list of error messages will force fallback to ping6.
2018-03-12 21:29:12 -05:00
cigamit 52a9e1fe8c Resolving Issue #1058
ICMP Ping to and IPv6 address fails to gather data for Ping Latency /
CentOS 7.4
2017-11-04 15:42:34 -05:00
Alexander a517dd13f6 fix regex for IPv6. fix ping output in CentOS 7 2017-05-11 14:39:04 +04:00
Thomas Berberich d2d5347c5e fix regex to use Domains like www.t-online.de 2017-02-20 21:21:35 +01:00
cigamit bd268601e4 Resolving Issue #284 2017-02-09 20:19:26 -06:00
Browniebraun 6839999bf8 Resolving issue #260
Script ping.pl not Working on FreeBSD and BSD systems
2017-02-02 14:50:24 +01:00
cigamit 060181aa21 resolving bug#2263 2016-08-18 21:01:44 -05:00
cigamit a92ff11ec6 update ping on Linux to work with ipv6 2016-08-18 15:16:53 -05:00
cigamit 7fe3534cde -bug:0002642: ping.pl does not take into account host port numbers 2016-01-20 08:49:51 -06:00
Reinhard Scheck ce726ce73a correct greping of icmp_[s|r]eq e.g. on F14
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.7@6124 860744bd-22fc-0310-8c96-e9fe5004b5ca
2010-11-18 20:03:09 +00:00
Reinhard Scheck b75beb5b9c 0001378: ping.pl script fails when using tcp:hostname
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.7@4898 860744bd-22fc-0310-8c96-e9fe5004b5ca
2009-01-31 20:01:27 +00:00
Tony Roman 6c5b7e37bd 0000943: scripts/ping.pl has incorrect response when "icmp hop redirect" occurs
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.7@4691 860744bd-22fc-0310-8c96-e9fe5004b5ca
2008-09-02 00:49:21 +00:00
Reinhard Scheck ef45e0880e output "U" in case of failure
re-calculate ping output of usec to print as ms

git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/branches/BRANCH_0_8_6/cacti@4062 860744bd-22fc-0310-8c96-e9fe5004b5ca
2007-08-10 22:13:48 +00:00
Larry Adams 0892c8b44c 0000921: cactid and ping.pl script error
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/branches/BRANCH_0_8_6/cacti@3877 860744bd-22fc-0310-8c96-e9fe5004b5ca
2007-02-23 02:34:55 +00:00
Tony Roman 6c0cca5942 bug#0000656: Perl scripts using back ticks is not portable
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/branches/BRANCH_0_8_6/cacti@3439 860744bd-22fc-0310-8c96-e9fe5004b5ca
2005-12-21 02:56:49 +00:00
Ian Berry 645d8d812e not everyone has the '-w' option
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@874 860744bd-22fc-0310-8c96-e9fe5004b5ca
2003-04-21 05:21:39 +00:00
Ian Berry 7545df6a7b use match regexp operator
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@858 860744bd-22fc-0310-8c96-e9fe5004b5ca
2003-04-16 04:57:43 +00:00
Andy Blyler ea1172ea38 replaced old ping script with the one Ian posted to: http://raxnet.net/board/viewtopic.php?t=442&highlight=ping+redhat&sid=5df2ce013957f94b0975ddd8867e5152
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@562 860744bd-22fc-0310-8c96-e9fe5004b5ca
2003-02-20 13:54:21 +00:00
Ian Berry 87de6aa496 making scripts compliment with 0.8 output structure
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@535 860744bd-22fc-0310-8c96-e9fe5004b5ca
2003-02-17 08:39:38 +00:00
Ian Berry 5074414f0b rh 73+ ping script fix
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@445 860744bd-22fc-0310-8c96-e9fe5004b5ca
2003-01-28 06:45:04 +00:00
Ian Berry eb59dd520f Initial revision
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@2 860744bd-22fc-0310-8c96-e9fe5004b5ca
2002-05-18 20:29:57 +00:00