Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The script table.pl takes PingER data and provides a table for various network performance metrics (such as RTTs, Packet Loss, Throughput, etc) from monitored to monitoring hosts in a simple but color-coded fashion (documentation available here). The script was originally written by Dr. Les Cottrell. Later Zafar Gilani modified it. The script now conforms to perl warnings and tainting mode. New version is now installed both at SLAC and SEECS.

...

Tainting on the other hand is used to make sure that a CGI script is logically secure. Taint (T) mode puts a Perl script into paranoid mode and treats all user supplied input as tainted and bad unless the programmer explicitly OKs the data. Read more here.

To display warnings (w) and enable tainting (T), add the following line at the top of the script:

Code Block
#!/usr/bin/perl -wTw

The above is pretty much an older style of Perl coding. One can also use:

Code Block
..
use warnings;
..

To enable tainting (T), just add the letter 'T' at the end of the top line of a script:

Code Block

#!/usr/bin/perl -wT

Once tainting is enabled, it has to be used at the command prompt as well or the script won't run. If one tried to run the script without tainting option (-T) from command line, the script fails with following message:

...