nerdexam
EC-Council

312-92 · Question #41

312-92 Question #41: Real Exam Question with Answer & Explanation

Sign in or unlock 312-92 to reveal the answer and full explanation for question #41. The question stem and answer options stay visible for context.

Question

William, a software developer just starting his career, was asked to create a website in PHP that would allow visitors to enter a month and a year for their birth date. The PHP code he creates has to validate the input after it is entered. If William uses the following code, what could a malicious user input to the year value to actually delete the whole website? $month = $_GET['month']; $year = $_GET['year']; exec("cal $month $year", $result); print "<PRE>"; foreach($result as $r) { EC-Council 312-92 Exam print "$r<BR>"; } print "</PRE>";

Options

  • A";gf -rm *"
  • B";dfr -php *"
  • C";php -rf *"
  • D";rm -rf *"

Unlock 312-92 to see the answer

You've previewed enough free 312-92 questions. Unlock 312-92 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 312-92 Practice