2 quizzes found.

When writing CLI scripts it is often useful to access the standard streams available to the operating system such as standard input/output and error. How does one access these streams in PHP 5?

  1. Use stdin(), stdout() and stderr() functions
  2. PHP::STDIN, PHP::STDOUT, PHP::STDERR class constants in PHP 5
  3. STDIN, STDOUT, and STDERR constants in PHP 5
  4. use the php::stdin(), php::stdout(), and php::stderr() class methods

Choose 1 answers

Which of the following functions can be used as a countermeasure to a Shell Injection attack?

  1. mysql_real_escape_string()
  2. escapeshellcmd()
  3. regenerateid()
  4. escapeshellarg()

Choose 2 answers